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 ¶
- func NewPatchExternalSourceDataSource() datasource.DataSource
- func NewPatchExternalSourceListResource() list.ListResource
- func NewPatchExternalSourceResource() resource.Resource
- type PatchExternalSourceDataSource
- func (d *PatchExternalSourceDataSource) ConfigValidators(ctx context.Context) []datasource.ConfigValidator
- func (d *PatchExternalSourceDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, ...)
- func (d *PatchExternalSourceDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (d *PatchExternalSourceDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *PatchExternalSourceDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type PatchExternalSourceDataSourceModel
- type PatchExternalSourceListResource
- func (r *PatchExternalSourceListResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *PatchExternalSourceListResource) List(ctx context.Context, req list.ListRequest, stream *list.ListResultsStream)
- func (r *PatchExternalSourceListResource) ListResourceConfigSchema(ctx context.Context, req list.ListResourceSchemaRequest, ...)
- func (r *PatchExternalSourceListResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- type PatchExternalSourceListResourceModel
- type PatchExternalSourceResource
- func (r *PatchExternalSourceResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *PatchExternalSourceResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *PatchExternalSourceResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *PatchExternalSourceResource) IdentitySchema(ctx context.Context, req resource.IdentitySchemaRequest, ...)
- func (r *PatchExternalSourceResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *PatchExternalSourceResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *PatchExternalSourceResource) ModifyPlan(ctx context.Context, req resource.ModifyPlanRequest, ...)
- func (r *PatchExternalSourceResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *PatchExternalSourceResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *PatchExternalSourceResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type PatchExternalSourceResourceModel
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 ¶
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 ¶
func (d *PatchExternalSourceDataSource) ConfigValidators(ctx context.Context) []datasource.ConfigValidator
ConfigValidators enforces that exactly one of id / name is supplied.
func (*PatchExternalSourceDataSource) Configure ¶
func (d *PatchExternalSourceDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
Configure wires the Jamf ProClassic client into the data source via the shared providerdata.ConfigureProClassic helper.
func (*PatchExternalSourceDataSource) Metadata ¶
func (d *PatchExternalSourceDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
Metadata sets the data source type name for the Terraform provider.
func (*PatchExternalSourceDataSource) Read ¶
func (d *PatchExternalSourceDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
Read fetches a patch external source by ID or by name and populates Terraform state.
func (*PatchExternalSourceDataSource) Schema ¶
func (d *PatchExternalSourceDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
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 ¶
func (r *PatchExternalSourceListResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
Configure wires the Jamf ProClassic client into the list resource via the shared providerdata.ConfigureProClassic helper.
func (*PatchExternalSourceListResource) List ¶
func (r *PatchExternalSourceListResource) List(ctx context.Context, req list.ListRequest, stream *list.ListResultsStream)
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 ¶
func (r *PatchExternalSourceListResource) ListResourceConfigSchema(ctx context.Context, req list.ListResourceSchemaRequest, resp *list.ListResourceSchemaResponse)
ListResourceConfigSchema describes the supported list filters.
func (*PatchExternalSourceListResource) Metadata ¶
func (r *PatchExternalSourceListResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
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 ¶
func (r *PatchExternalSourceResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
Configure wires the Jamf ProClassic client into the resource via the shared providerdata.ConfigureProClassic helper.
func (*PatchExternalSourceResource) Create ¶
func (r *PatchExternalSourceResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
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 ¶
func (r *PatchExternalSourceResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
Delete removes a Jamf Pro patch external source.
func (*PatchExternalSourceResource) IdentitySchema ¶
func (r *PatchExternalSourceResource) IdentitySchema(ctx context.Context, req resource.IdentitySchemaRequest, resp *resource.IdentitySchemaResponse)
IdentitySchema defines the identifier used for import and list results.
func (*PatchExternalSourceResource) ImportState ¶
func (r *PatchExternalSourceResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
ImportState handles import by the Jamf Pro patch external source ID.
func (*PatchExternalSourceResource) Metadata ¶
func (r *PatchExternalSourceResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
Metadata sets the resource type name for the Terraform provider.
func (*PatchExternalSourceResource) ModifyPlan ¶ added in v1.7.0
func (r *PatchExternalSourceResource) ModifyPlan(ctx context.Context, req resource.ModifyPlanRequest, resp *resource.ModifyPlanResponse)
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 ¶
func (r *PatchExternalSourceResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
Read refreshes the Terraform state with the latest patch external source representation.
func (*PatchExternalSourceResource) Schema ¶
func (r *PatchExternalSourceResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
Schema returns the Terraform schema for the patch external source resource.
func (*PatchExternalSourceResource) Update ¶
func (r *PatchExternalSourceResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
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.