Documentation ¶
Index ¶
- func DeleteOrgInventory(ctx context.Context, stateInventory *OrgInventoryModel) ([]string, diag.Diagnostics)
- func DetectDeviceInfoType(diags *diag.Diagnostics, deviceInfo string) (bool, bool)
- func GenDeviceMap(devices *basetypes.MapValue) map[string]InventoryValue
- func OrgInventoryResourceSchema(ctx context.Context) schema.Schema
- func TerraformToSdk(ctx context.Context, stateInventory *OrgInventoryModel, ...) ([]string, []string, []string, map[string]string, map[string][]string, ...)
- type DevicesType
- func (t DevicesType) Equal(o attr.Type) bool
- func (t DevicesType) String() string
- func (t DevicesType) ValueFromObject(ctx context.Context, in basetypes.ObjectValue) (basetypes.ObjectValuable, diag.Diagnostics)
- func (t DevicesType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)
- func (t DevicesType) ValueType(ctx context.Context) attr.Value
- type DevicesValue
- func NewDevicesValue(attributeTypes map[string]attr.Type, attributes map[string]attr.Value) (DevicesValue, diag.Diagnostics)
- func NewDevicesValueMust(attributeTypes map[string]attr.Type, attributes map[string]attr.Value) DevicesValue
- func NewDevicesValueNull() DevicesValue
- func NewDevicesValueUnknown() DevicesValue
- func (v DevicesValue) AttributeTypes(ctx context.Context) map[string]attr.Type
- func (v DevicesValue) Equal(o attr.Value) bool
- func (v DevicesValue) IsNull() bool
- func (v DevicesValue) IsUnknown() bool
- func (v DevicesValue) String() string
- func (v DevicesValue) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics)
- func (v DevicesValue) ToTerraformValue(ctx context.Context) (tftypes.Value, error)
- func (v DevicesValue) Type(ctx context.Context) attr.Type
- type InventoryType
- func (t InventoryType) Equal(o attr.Type) bool
- func (t InventoryType) String() string
- func (t InventoryType) ValueFromObject(ctx context.Context, in basetypes.ObjectValue) (basetypes.ObjectValuable, diag.Diagnostics)
- func (t InventoryType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)
- func (t InventoryType) ValueType(ctx context.Context) attr.Value
- type InventoryValue
- func NewInventoryValue(attributeTypes map[string]attr.Type, attributes map[string]attr.Value) (InventoryValue, diag.Diagnostics)
- func NewInventoryValueMust(attributeTypes map[string]attr.Type, attributes map[string]attr.Value) InventoryValue
- func NewInventoryValueNull() InventoryValue
- func NewInventoryValueUnknown() InventoryValue
- func (v InventoryValue) AttributeTypes(ctx context.Context) map[string]attr.Type
- func (v InventoryValue) Equal(o attr.Value) bool
- func (v InventoryValue) IsNull() bool
- func (v InventoryValue) IsUnknown() bool
- func (v InventoryValue) String() string
- func (v InventoryValue) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics)
- func (v InventoryValue) ToTerraformValue(ctx context.Context) (tftypes.Value, error)
- func (v InventoryValue) Type(ctx context.Context) attr.Type
- type OrgInventoryModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteOrgInventory ¶ added in v0.2.0
func DeleteOrgInventory( ctx context.Context, stateInventory *OrgInventoryModel, ) ([]string, diag.Diagnostics)
func DetectDeviceInfoType ¶ added in v0.2.0
func DetectDeviceInfoType(diags *diag.Diagnostics, deviceInfo string) (bool, bool)
func GenDeviceMap ¶ added in v0.2.0
func GenDeviceMap(devices *basetypes.MapValue) map[string]InventoryValue
func TerraformToSdk ¶
func TerraformToSdk( ctx context.Context, stateInventory *OrgInventoryModel, planInventory *OrgInventoryModel, ) ([]string, []string, []string, map[string]string, map[string][]string, diag.Diagnostics)
Types ¶
type DevicesType ¶
type DevicesType struct {
basetypes.ObjectType
}
func (DevicesType) String ¶
func (t DevicesType) String() string
func (DevicesType) ValueFromObject ¶
func (t DevicesType) ValueFromObject(ctx context.Context, in basetypes.ObjectValue) (basetypes.ObjectValuable, diag.Diagnostics)
func (DevicesType) ValueFromTerraform ¶
type DevicesValue ¶
type DevicesValue struct { DeviceprofileId basetypes.StringValue `tfsdk:"deviceprofile_id"` Hostname basetypes.StringValue `tfsdk:"hostname"` Id basetypes.StringValue `tfsdk:"id"` Mac basetypes.StringValue `tfsdk:"mac"` Magic basetypes.StringValue `tfsdk:"claim_code"` Model basetypes.StringValue `tfsdk:"model"` OrgId basetypes.StringValue `tfsdk:"org_id"` Serial basetypes.StringValue `tfsdk:"serial"` SiteId basetypes.StringValue `tfsdk:"site_id"` DevicesType basetypes.StringValue `tfsdk:"type"` UnclaimWhenDestroyed basetypes.BoolValue `tfsdk:"unclaim_when_destroyed"` VcMac basetypes.StringValue `tfsdk:"vc_mac"` // contains filtered or unexported fields }
func NewDevicesValue ¶
func NewDevicesValue(attributeTypes map[string]attr.Type, attributes map[string]attr.Value) (DevicesValue, diag.Diagnostics)
func NewDevicesValueMust ¶
func NewDevicesValueNull ¶
func NewDevicesValueNull() DevicesValue
func NewDevicesValueUnknown ¶
func NewDevicesValueUnknown() DevicesValue
func (DevicesValue) AttributeTypes ¶
func (DevicesValue) IsNull ¶
func (v DevicesValue) IsNull() bool
func (DevicesValue) IsUnknown ¶
func (v DevicesValue) IsUnknown() bool
func (DevicesValue) String ¶
func (v DevicesValue) String() string
func (DevicesValue) ToObjectValue ¶
func (v DevicesValue) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics)
func (DevicesValue) ToTerraformValue ¶
type InventoryType ¶ added in v0.2.2
type InventoryType struct {
basetypes.ObjectType
}
func (InventoryType) String ¶ added in v0.2.2
func (t InventoryType) String() string
func (InventoryType) ValueFromObject ¶ added in v0.2.2
func (t InventoryType) ValueFromObject(ctx context.Context, in basetypes.ObjectValue) (basetypes.ObjectValuable, diag.Diagnostics)
func (InventoryType) ValueFromTerraform ¶ added in v0.2.2
type InventoryValue ¶ added in v0.2.2
type InventoryValue struct { DeviceprofileId basetypes.StringValue `tfsdk:"deviceprofile_id"` Hostname basetypes.StringValue `tfsdk:"hostname"` Id basetypes.StringValue `tfsdk:"id"` Mac basetypes.StringValue `tfsdk:"mac"` Magic basetypes.StringValue `tfsdk:"claim_code"` Model basetypes.StringValue `tfsdk:"model"` OrgId basetypes.StringValue `tfsdk:"org_id"` Serial basetypes.StringValue `tfsdk:"serial"` SiteId basetypes.StringValue `tfsdk:"site_id"` InventoryType basetypes.StringValue `tfsdk:"type"` UnclaimWhenDestroyed basetypes.BoolValue `tfsdk:"unclaim_when_destroyed"` VcMac basetypes.StringValue `tfsdk:"vc_mac"` // contains filtered or unexported fields }
func NewInventoryValue ¶ added in v0.2.2
func NewInventoryValue(attributeTypes map[string]attr.Type, attributes map[string]attr.Value) (InventoryValue, diag.Diagnostics)
func NewInventoryValueMust ¶ added in v0.2.2
func NewInventoryValueNull ¶ added in v0.2.2
func NewInventoryValueNull() InventoryValue
func NewInventoryValueUnknown ¶ added in v0.2.2
func NewInventoryValueUnknown() InventoryValue
func (InventoryValue) AttributeTypes ¶ added in v0.2.2
func (InventoryValue) IsNull ¶ added in v0.2.2
func (v InventoryValue) IsNull() bool
func (InventoryValue) IsUnknown ¶ added in v0.2.2
func (v InventoryValue) IsUnknown() bool
func (InventoryValue) String ¶ added in v0.2.2
func (v InventoryValue) String() string
func (InventoryValue) ToObjectValue ¶ added in v0.2.2
func (v InventoryValue) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics)
func (InventoryValue) ToTerraformValue ¶ added in v0.2.2
type OrgInventoryModel ¶
type OrgInventoryModel struct { Devices types.List `tfsdk:"devices"` Inventory types.Map `tfsdk:"inventory"` OrgId types.String `tfsdk:"org_id"` }
func SdkToTerraform ¶
func SdkToTerraform( ctx context.Context, orgId string, data *[]models.Inventory, ref_inventory *OrgInventoryModel, ) (OrgInventoryModel, diag.Diagnostics)
Click to show internal directories.
Click to hide internal directories.