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

hostgroups

package
v1.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HgDynamic    = "dynamic"
	HgStatic     = "static"
	HgStaticByID = "staticByID"
)

Functions

func AssignAssignmentRule added in v0.0.30

func AssignAssignmentRule(
	ctx context.Context,
	assignmentRule string,
	config *HostGroupResourceModel,
) diag.Diagnostics

AssignAssignmentRule takes an assignment_rule from the API and assigns it to the correct attribute.

func ConvertHostGroupsToList added in v0.0.45

func ConvertHostGroupsToList(
	ctx context.Context,
	groups []*models.HostGroupsHostGroupV1,
) (basetypes.ListValue, diag.Diagnostics)

ConvertHostGroupsToSet converts []*models.HostGroupsHostGroupV1 to a Terraform list of host group IDs. The returned types.ListValue will never be null.

func ConvertHostGroupsToSet added in v0.0.23

func ConvertHostGroupsToSet(
	ctx context.Context,
	groups []*models.HostGroupsHostGroupV1,
) (basetypes.SetValue, diag.Diagnostics)

ConvertHostGroupsToSet converts []*models.HostGroupsHostGroupV1 to a Terraform set of host group IDs. The returned types.SetValue will never be null.

func GenerateAssignmentRule added in v0.0.30

func GenerateAssignmentRule(
	ctx context.Context,
	config HostGroupResourceModel,
) (string, diag.Diagnostics)

GenerateAssignmentRule returns a valid assignment rule based on the host group type.

func NewHostGroupDataSource added in v0.0.68

func NewHostGroupDataSource() datasource.DataSource

NewHostGroupDataSource is a helper function to simplify the provider implementation.

func NewHostGroupMembersDataSource added in v0.0.85

func NewHostGroupMembersDataSource() datasource.DataSource

NewHostGroupMembersDataSource is a helper function to simplify the provider implementation.

func NewHostGroupResource added in v0.0.30

func NewHostGroupResource() resource.Resource

NewHostGroupResource is a helper function to simplify the provider implementation.

func RegisterSweepers added in v0.0.62

func RegisterSweepers()

Types

type HostGroupAction

type HostGroupAction int

HostGroupAction action for host group action api.

const (
	RemoveHostGroup HostGroupAction = iota
	AddHostGroup
)

func (HostGroupAction) String

func (h HostGroupAction) String() string

String convert HostGroupAction to string value the api accepts.

type HostGroupDataSourceModel added in v0.0.68

type HostGroupDataSourceModel struct {
	ID                types.String `tfsdk:"id"`
	Name              types.String `tfsdk:"name"`
	Description       types.String `tfsdk:"description"`
	GroupType         types.String `tfsdk:"type"`
	AssignmentRule    types.String `tfsdk:"assignment_rule"`
	CreatedBy         types.String `tfsdk:"created_by"`
	CreatedTimestamp  types.String `tfsdk:"created_timestamp"`
	ModifiedBy        types.String `tfsdk:"modified_by"`
	ModifiedTimestamp types.String `tfsdk:"modified_timestamp"`
}

HostGroupDataSourceModel represents the data source model.

type HostGroupMembersDataSourceModel added in v0.0.85

type HostGroupMembersDataSourceModel struct {
	ID          types.String `tfsdk:"id"`
	Name        types.String `tfsdk:"name"`
	Filter      types.String `tfsdk:"filter"`
	HostIDs     types.Set    `tfsdk:"host_ids"`
	MemberCount types.Int64  `tfsdk:"member_count"`
}

HostGroupMembersDataSourceModel represents the data source model.

type HostGroupResourceModel added in v0.0.30

type HostGroupResourceModel struct {
	ID             types.String `tfsdk:"id"`
	Name           types.String `tfsdk:"name"`
	AssignmentRule types.String `tfsdk:"assignment_rule"`
	Hostnames      types.Set    `tfsdk:"hostnames"`
	HostIDs        types.Set    `tfsdk:"host_ids"`
	Description    types.String `tfsdk:"description"`
	GroupType      types.String `tfsdk:"type"`
	LastUpdated    types.String `tfsdk:"last_updated"`
}

HostGroupResourceModel maps the resource schema data.

Jump to

Keyboard shortcuts

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