device_group

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MPL-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ValidOperators = []string{
	"is",
	"is not",
	"has",
	"does not have",
	"member of",
	"not member of",
	"before (yyyy-mm-dd)",
	"after (yyyy-mm-dd)",
	"in less than x days",
	"in more than x days",
	"more than x days ago",
	"less than x days ago",
	"like",
	"not like",
	"greater than",
	"more than",
	"less than",
	"greater than or equal",
	"less than or equal",
	"matches regex",
	"does not match regex",
}

ValidOperators contains all valid search type values for criteria validation.

Functions

func NewDeviceGroupDataSource

func NewDeviceGroupDataSource() datasource.DataSource

NewDeviceGroupDataSource returns a new instance of DeviceGroupDataSource.

func NewDeviceGroupListResource added in v0.7.0

func NewDeviceGroupListResource() list.ListResource

NewDeviceGroupListResource returns a list resource for device group queries.

func NewDeviceGroupResource

func NewDeviceGroupResource() resource.Resource

NewDeviceGroupResource returns a new instance of DeviceGroupResource.

Types

type DeviceGroupCriteriaModel

type DeviceGroupCriteriaModel struct {
	Order                 types.Int64  `tfsdk:"order"`
	AttributeName         types.String `tfsdk:"criteria"`
	Operator              types.String `tfsdk:"operator"`
	AttributeValue        types.String `tfsdk:"value"`
	JoinType              types.String `tfsdk:"and_or"`
	HasOpeningParenthesis types.Bool   `tfsdk:"has_opening_parenthesis"`
	HasClosingParenthesis types.Bool   `tfsdk:"has_closing_parenthesis"`
}

DeviceGroupCriteriaModel represents a smart group criterion definition.

type DeviceGroupDataSource

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

DeviceGroupDataSource implements the Terraform data source for Jamf device groups.

func (*DeviceGroupDataSource) Configure

Configure sets up the API client for the data source from the provider configuration.

func (*DeviceGroupDataSource) Metadata

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

func (*DeviceGroupDataSource) Read

Read fetches a device group by ID and populates the Terraform state.

func (*DeviceGroupDataSource) Schema

Schema sets the Terraform schema for the data source.

type DeviceGroupDataSourceModel

type DeviceGroupDataSourceModel struct {
	ID          types.String               `tfsdk:"id"`
	Name        types.String               `tfsdk:"name"`
	Description types.String               `tfsdk:"description"`
	DeviceType  types.String               `tfsdk:"device_type"`
	GroupType   types.String               `tfsdk:"group_type"`
	Timeouts    datasourceTimeouts.Value   `tfsdk:"timeouts"`
	Criteria    []DeviceGroupCriteriaModel `tfsdk:"criteria"`
	Members     types.List                 `tfsdk:"members"`
	MemberCount types.Int64                `tfsdk:"member_count"`
}

DeviceGroupDataSourceModel represents the Terraform data source model for a Jamf device group.

type DeviceGroupListResource added in v0.7.0

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

DeviceGroupListResource implements Terraform query list support for device groups.

func (*DeviceGroupListResource) Configure added in v0.7.0

Configure wires the provider client into the list resource.

func (*DeviceGroupListResource) List added in v0.7.0

List executes the query and streams device group identities back to Terraform.

func (*DeviceGroupListResource) ListResourceConfigSchema added in v0.7.0

ListResourceConfigSchema describes the supported list filters.

func (*DeviceGroupListResource) Metadata added in v0.7.0

Metadata sets the list resource type name.

type DeviceGroupListResourceModel added in v0.7.0

type DeviceGroupListResourceModel struct {
	Filters []filters.FilterModel `tfsdk:"filter"`
}

DeviceGroupListResourceModel represents the config model for device group list queries.

type DeviceGroupResource

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

DeviceGroupResource implements the Terraform resource for Jamf device groups.

func (*DeviceGroupResource) Configure

Configure sets up the API client for the resource from the provider configuration.

func (*DeviceGroupResource) Create

Create creates a new Jamf Platform device group resource.

func (*DeviceGroupResource) Delete

Delete removes the device group from Jamf Platform.

func (*DeviceGroupResource) IdentitySchema added in v0.7.0

IdentitySchema defines the unique identifier for device group resources.

func (*DeviceGroupResource) ImportState

ImportState handles the import of existing Device Group resources.

func (*DeviceGroupResource) Metadata

Metadata sets the resource type name for the Terraform provider.

func (*DeviceGroupResource) Read

Read syncs the Terraform state with the latest API representation.

func (*DeviceGroupResource) Schema

Schema returns the Terraform schema for the device group resource.

func (*DeviceGroupResource) Update

Update updates name/description/criteria and reconciles membership for static groups.

func (*DeviceGroupResource) UpgradeState added in v0.13.0

UpgradeState returns state upgraders for migrating between schema versions.

type DeviceGroupResourceModel

type DeviceGroupResourceModel struct {
	ID          types.String               `tfsdk:"id"`
	Name        types.String               `tfsdk:"name"`
	Description types.String               `tfsdk:"description"`
	DeviceType  types.String               `tfsdk:"device_type"`
	GroupType   types.String               `tfsdk:"group_type"`
	Criteria    []DeviceGroupCriteriaModel `tfsdk:"criteria"`
	Members     types.Set                  `tfsdk:"members"`
	MemberCount types.Int64                `tfsdk:"member_count"`
	Timeouts    resourceTimeouts.Value     `tfsdk:"timeouts"`
}

DeviceGroupResourceModel represents the Terraform resource model for a Jamf device group.

Jump to

Keyboard shortcuts

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