Documentation
¶
Index ¶
- type Registry
- func (r *Registry) AttrReference(tfResourceType, jamfID, attr string) (string, bool)
- func (r *Registry) HasType(tfResourceType string) bool
- func (r *Registry) Register(tfResourceType, jamfID, tfAddress string)
- func (r *Registry) Resolve(tfResourceType, jamfID string) (string, bool)
- func (r *Registry) ResolveAny(jamfID string, tfResourceTypes ...string) (string, bool)
- func (r *Registry) Unregister(tfResourceType, jamfID string)
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 (*Registry) AttrReference ¶
AttrReference returns a full Terraform attribute reference string. Example: AttrReference("jamfpro_script", "42", "id") -> "jamfpro_script.disable_bluetooth.id"
func (*Registry) HasType ¶
HasType reports whether any resources of the given type have been registered.
func (*Registry) Register ¶
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 ¶
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 ¶
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
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).