Help us shape the future of Go! Take the 2026 Go Developer Survey

registry

package
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry tracks the mapping of Jamf resource type + ID to Terraform resource addresses. This enables resolving raw Jamf IDs in generated HCL to proper cross-resource references.

func New

func New() *Registry

func (*Registry) AttrReference

func (r *Registry) AttrReference(tfResourceType, jamfID, attr string) (string, bool)

AttrReference returns a full Terraform attribute reference string. Example: AttrReference("jamfpro_script", "42", "id") -> "jamfpro_script.disable_bluetooth.id"

func (*Registry) HasType

func (r *Registry) HasType(tfResourceType string) bool

HasType reports whether any resources of the given type have been registered.

func (*Registry) Register

func (r *Registry) Register(tfResourceType, jamfID, tfAddress string)

Register records a mapping from a Jamf resource type + ID to a Terraform resource address. Example: Register("jamfpro_script", "42", "jamfpro_script.disable_bluetooth")

func (*Registry) Resolve

func (r *Registry) Resolve(tfResourceType, jamfID string) (string, bool)

Resolve looks up a Terraform resource address for a given Jamf resource type + ID. Returns the address and true if found, or empty string and false if not.

func (*Registry) ResolveAny

func (r *Registry) ResolveAny(jamfID string, tfResourceTypes ...string) (string, bool)

ResolveAny tries to resolve a Jamf ID across multiple resource types. Returns the first match found. Useful for scope fields that can reference either smart or static groups.

func (*Registry) Unregister added in v0.4.0

func (r *Registry) Unregister(tfResourceType, jamfID string)

Unregister removes a mapping for a Jamf resource type + ID. After removal, Resolve returns false for it, so any reference to the (now absent) resource is left as a raw ID rather than rewritten to a dangling Terraform address. Used when post-processing strips resources (e.g. compliance-benchmark artifacts).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL