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

patch_external_source

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: 32 Imported by: 0

Documentation

Overview

Package patch_external_source implements the jamfplatform_pro_patch_external_source resource, data source, and list resource backed by the Jamf ProClassic patch external sources API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPatchExternalSourceDataSource

func NewPatchExternalSourceDataSource() datasource.DataSource

NewPatchExternalSourceDataSource returns a new instance of PatchExternalSourceDataSource.

func NewPatchExternalSourceListResource

func NewPatchExternalSourceListResource() list.ListResource

NewPatchExternalSourceListResource returns a list resource for Jamf Pro patch external source queries.

func NewPatchExternalSourceResource

func NewPatchExternalSourceResource() resource.Resource

NewPatchExternalSourceResource returns a new instance of PatchExternalSourceResource.

Types

type PatchExternalSourceDataSource

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

PatchExternalSourceDataSource implements the Terraform data source for Jamf Pro patch external sources. The singular data source supports lookup by ID OR by name — exactly one of the two must be supplied.

func (*PatchExternalSourceDataSource) ConfigValidators

ConfigValidators enforces that exactly one of id / name is supplied.

func (*PatchExternalSourceDataSource) Configure

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

func (*PatchExternalSourceDataSource) Metadata

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

func (*PatchExternalSourceDataSource) Read

Read fetches a patch external source by ID or by name and populates Terraform state.

func (*PatchExternalSourceDataSource) Schema

Schema returns the data source schema. id and name are the mutually-exclusive selectors (Optional+Computed); the remaining attributes are populated from the SDK response.

type PatchExternalSourceDataSourceModel

type PatchExternalSourceDataSourceModel struct {
	ID                           types.String             `tfsdk:"id"`
	Name                         types.String             `tfsdk:"name"`
	Enabled                      types.Bool               `tfsdk:"enabled"`
	HostName                     types.String             `tfsdk:"host_name"`
	Port                         types.Int64              `tfsdk:"port"`
	SslEnabled                   types.Bool               `tfsdk:"ssl_enabled"`
	CertificateValidationEnabled types.Bool               `tfsdk:"certificate_validation_enabled"`
	AvailableTitles              []availabletitles.Model  `tfsdk:"available_titles"`
	Timeouts                     datasourceTimeouts.Value `tfsdk:"timeouts"`
}

PatchExternalSourceDataSourceModel represents the Terraform data source model. Either id or name must be supplied (enforced by ExactlyOneOf at config validation); all remaining attributes are populated from the SDK response.

type PatchExternalSourceListResource

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

PatchExternalSourceListResource implements Terraform query list support. Classic /patchexternalsources accepts no query parameters, so the optional `filter` block is applied client-side via filters.ApplyClassicFilter after the full list is fetched.

func (*PatchExternalSourceListResource) Configure

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

func (*PatchExternalSourceListResource) List

List executes the query and streams patch external source identities back to Terraform.

The classic /patchexternalsources list endpoint returns only id+name per item (a flat []IDName). When include_resource is requested we therefore hydrate only id and name; the remaining attributes are set null rather than issuing a per-item GET against this concurrency-sensitive classic endpoint. A list preview does not require full hydration — consumers needing the full object should use the singular data source or the managed resource.

func (*PatchExternalSourceListResource) ListResourceConfigSchema

ListResourceConfigSchema describes the supported list filters.

func (*PatchExternalSourceListResource) Metadata

Metadata sets the list resource type name.

type PatchExternalSourceListResourceModel

type PatchExternalSourceListResourceModel struct {
	Filter   *filters.ClassicFilterModel `tfsdk:"filter"`
	Timeouts listtimeouts.Value          `tfsdk:"timeouts"`
}

PatchExternalSourceListResourceModel represents the config model for list queries. Classic has no RSQL — the filter shape is the shared client-side substring block.

type PatchExternalSourceResource

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

PatchExternalSourceResource implements the Terraform resource for Jamf ProClassic patch external sources.

func (*PatchExternalSourceResource) Configure

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

func (*PatchExternalSourceResource) Create

Create creates a new Jamf Pro patch external source. Classic POSTs to id="0"; the server allocates the real integer ID and returns it in the response body.

func (*PatchExternalSourceResource) Delete

Delete removes a Jamf Pro patch external source.

func (*PatchExternalSourceResource) IdentitySchema

IdentitySchema defines the identifier used for import and list results.

func (*PatchExternalSourceResource) ImportState

ImportState handles import by the Jamf Pro patch external source ID.

func (*PatchExternalSourceResource) Metadata

Metadata sets the resource type name for the Terraform provider.

func (*PatchExternalSourceResource) ModifyPlan added in v1.7.0

ModifyPlan reports a name that another object of this type already holds, when the provider's name_collision_check enables the strict check.

func (*PatchExternalSourceResource) Read

Read refreshes the Terraform state with the latest patch external source representation.

func (*PatchExternalSourceResource) Schema

Schema returns the Terraform schema for the patch external source resource.

func (*PatchExternalSourceResource) Update

Update updates a Jamf Pro patch external source. Classic UpdatePatchExternalSourceByID returns 201 with an empty body — we must GET to refresh state. The prior state's port is read alongside the plan so a port the config dropped is cleared on the wire (see portForWrite).

type PatchExternalSourceResourceModel

type PatchExternalSourceResourceModel struct {
	ID                           types.String           `tfsdk:"id"`
	Name                         types.String           `tfsdk:"name"`
	Enabled                      types.Bool             `tfsdk:"enabled"`
	HostName                     types.String           `tfsdk:"host_name"`
	Port                         types.Int64            `tfsdk:"port"`
	SslEnabled                   types.Bool             `tfsdk:"ssl_enabled"`
	CertificateValidationEnabled types.Bool             `tfsdk:"certificate_validation_enabled"`
	Timeouts                     resourceTimeouts.Value `tfsdk:"timeouts"`
}

PatchExternalSourceResourceModel represents the Terraform resource model for a Jamf Pro patch external source.

Jump to

Keyboard shortcuts

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