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

activation_code

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MPL-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package activation_code implements the jamfplatform_pro_activation_code singleton resource and data source backed by the Jamf ProClassic /activationcode endpoint.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewActivationCodeDataSource

func NewActivationCodeDataSource() datasource.DataSource

NewActivationCodeDataSource returns a new instance of ActivationCodeDataSource.

func NewActivationCodeResource

func NewActivationCodeResource() resource.Resource

NewActivationCodeResource returns a new instance of ActivationCodeResource.

Types

type ActivationCodeDataSource

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

ActivationCodeDataSource implements the Terraform data source for the Jamf Pro activation code.

func (*ActivationCodeDataSource) Configure

Configure wires the Jamf ProClassic client into the data source.

func (*ActivationCodeDataSource) Metadata

Metadata sets the data source type name for the Terraform provider.

func (*ActivationCodeDataSource) Read

Read fetches the current activation code and populates Terraform state.

func (*ActivationCodeDataSource) Schema

Schema returns the data source schema.

type ActivationCodeDataSourceModel

type ActivationCodeDataSourceModel struct {
	ID               types.String             `tfsdk:"id"`
	OrganizationName types.String             `tfsdk:"organization_name"`
	Code             types.String             `tfsdk:"code"`
	Timeouts         datasourceTimeouts.Value `tfsdk:"timeouts"`
}

ActivationCodeDataSourceModel represents the Terraform data source model.

type ActivationCodeResource

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

ActivationCodeResource implements the singleton resource for the Jamf Pro activation code. Backed by an Update-only ProClassic API (GET + PUT; no Create/Delete on the remote): Create funnels into Update; Delete is a no-op that only removes the object from Terraform state. The activation code is a license secret — never delete or blank it, and never PUT a partial body (a partial write risks wiping the license).

func (*ActivationCodeResource) Configure

Configure wires the Jamf ProClassic client into the resource via the shared providerdata.ConfigureProClassic helper.

func (*ActivationCodeResource) Create

Create handles initial provisioning of the activation code singleton. The ProClassic API has no Create endpoint for this object, so this funnels into Update against the plan, then reads back to capture authoritative state.

func (*ActivationCodeResource) Delete

Delete is a no-op on the ProClassic API. The activation code is a license secret that must persist on the tenant — there is no remote delete, and blanking it would disable the tenant. Terraform removes the resource from state on its own after this returns.

func (*ActivationCodeResource) IdentitySchema

IdentitySchema defines the identifier used for import. Singleton resources accept only the fixed helpers.SingletonID value.

func (*ActivationCodeResource) ImportState

ImportState handles import for the singleton. Only the fixed helpers.SingletonID value is accepted; any other identifier is rejected with a clear error.

terraform import jamfplatform_pro_activation_code.<name> singleton

func (*ActivationCodeResource) Metadata

Metadata sets the resource type name for the Terraform provider.

func (*ActivationCodeResource) Read

Read refreshes Terraform state with the latest activation code from the ProClassic API.

func (*ActivationCodeResource) Schema

Schema returns the Terraform schema for the activation code resource.

func (*ActivationCodeResource) Update

Update writes the new activation code and organization name to the ProClassic API. Both fields are always written together (see buildActivationCodeInput).

type ActivationCodeResourceModel

type ActivationCodeResourceModel struct {
	ID               types.String           `tfsdk:"id"`
	OrganizationName types.String           `tfsdk:"organization_name"`
	Code             types.String           `tfsdk:"code"`
	Timeouts         resourceTimeouts.Value `tfsdk:"timeouts"`
}

ActivationCodeResourceModel represents the Terraform resource model for the Jamf Pro activation code singleton. Both fields round-trip through a single ProClassic GET/PUT — the GET returns the code in clear, so normal drift detection applies.

Jump to

Keyboard shortcuts

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