ipamfederation

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllocationAttrTypes = map[string]attr.Type{
	"allocated":   types.Int64Type,
	"delegated":   types.Int64Type,
	"overlapping": types.Int64Type,
	"reserved":    types.Int64Type,
}
View Source
var AllocationResourceSchemaAttributes = map[string]schema.Attribute{
	"allocated": schema.Int64Attribute{
		Computed:            true,
		MarkdownDescription: "Percent of total space allocated.",
	},
	"delegated": schema.Int64Attribute{
		Computed:            true,
		MarkdownDescription: "Percent of total space delegated.",
	},
	"overlapping": schema.Int64Attribute{
		Computed:            true,
		MarkdownDescription: "Percent of total space in overlapping blocks.",
	},
	"reserved": schema.Int64Attribute{
		Computed:            true,
		MarkdownDescription: "Percent of total space reserved.",
	},
}
View Source
var FederatedBlockAttrTypes = map[string]attr.Type{
	"address":         types.StringType,
	"allocation_v4":   types.ObjectType{AttrTypes: AllocationAttrTypes},
	"cidr":            types.Int64Type,
	"comment":         types.StringType,
	"created_at":      timetypes.RFC3339Type{},
	"federated_realm": types.StringType,
	"id":              types.StringType,
	"name":            types.StringType,
	"parent":          types.StringType,
	"protocol":        types.StringType,
	"tags":            types.MapType{ElemType: types.StringType},
	"tags_all":        types.MapType{ElemType: types.StringType},
	"updated_at":      timetypes.RFC3339Type{},
}
View Source
var FederatedBlockResourceSchemaAttributes = map[string]schema.Attribute{
	"address": schema.StringAttribute{
		Optional: true,
		Computed: true,
		PlanModifiers: []planmodifier.String{
			stringplanmodifier.RequiresReplaceIfConfigured(),
		},
		MarkdownDescription: "The address of the subnet in the form “a.b.c.d”"},
	"allocation_v4": schema.SingleNestedAttribute{
		Attributes:          AllocationResourceSchemaAttributes,
		Computed:            true,
		MarkdownDescription: "The percentage of the Federated Block’s total address space that is consumed by Leaf Terminals.",
	},
	"cidr": schema.Int64Attribute{
		Required:            true,
		MarkdownDescription: "The CIDR of the federated block. This is required, if _address_ does not specify it in its input.",
	},
	"comment": schema.StringAttribute{
		Optional:            true,
		Computed:            true,
		Default:             stringdefault.StaticString(""),
		MarkdownDescription: "The description for the federated block. May contain 0 to 1024 characters. Can include UTF-8.",
	},
	"created_at": schema.StringAttribute{
		CustomType:          timetypes.RFC3339Type{},
		Computed:            true,
		MarkdownDescription: "Time when the object has been created.",
	},
	"federated_realm": schema.StringAttribute{
		Required:            true,
		MarkdownDescription: "The resource identifier.",
	},
	"id": schema.StringAttribute{
		Computed: true,
		PlanModifiers: []planmodifier.String{
			stringplanmodifier.UseStateForUnknown(),
		},
		MarkdownDescription: "The resource identifier.",
	},
	"name": schema.StringAttribute{
		Optional:            true,
		Computed:            true,
		Default:             stringdefault.StaticString(""),
		MarkdownDescription: "The name of the federated block. May contain 1 to 256 characters. Can include UTF-8.",
	},
	"parent": schema.StringAttribute{
		Computed:            true,
		MarkdownDescription: "The resource identifier.",
	},
	"protocol": schema.StringAttribute{
		Computed:            true,
		MarkdownDescription: "The type of protocol of federated block (_ip4_ or _ip6_).",
	},
	"tags": schema.MapAttribute{
		ElementType:         types.StringType,
		Optional:            true,
		MarkdownDescription: "The tags for the federated block in JSON format.",
	},
	"updated_at": schema.StringAttribute{
		CustomType:          timetypes.RFC3339Type{},
		Computed:            true,
		MarkdownDescription: "Time when the object has been updated. Equals to _created_at_ if not updated after creation.",
	},
	"tags_all": schema.MapAttribute{
		ElementType:         types.StringType,
		Computed:            true,
		MarkdownDescription: "The tags of the federation block in JSON format including default tags.",
	},
}
View Source
var FederatedRealmAttrTypes = map[string]attr.Type{
	"allocation_v4": types.ObjectType{AttrTypes: AllocationAttrTypes},
	"comment":       types.StringType,
	"created_at":    timetypes.RFC3339Type{},
	"id":            types.StringType,
	"name":          types.StringType,
	"tags":          types.MapType{ElemType: types.StringType},
	"tags_all":      types.MapType{ElemType: types.StringType},
	"updated_at":    timetypes.RFC3339Type{},
}
View Source
var FederatedRealmResourceSchemaAttributes = map[string]schema.Attribute{
	"allocation_v4": schema.SingleNestedAttribute{
		Attributes:          AllocationResourceSchemaAttributes,
		Computed:            true,
		MarkdownDescription: "The aggregate of all Federated Blocks within the Realm.",
	},
	"comment": schema.StringAttribute{
		Optional:            true,
		Computed:            true,
		Default:             stringdefault.StaticString(""),
		MarkdownDescription: "The description of the federated realm. May contain 0 to 1024 characters. Can include UTF-8.",
	},
	"created_at": schema.StringAttribute{
		CustomType:          timetypes.RFC3339Type{},
		Computed:            true,
		MarkdownDescription: "Time when the object has been created.",
	},
	"id": schema.StringAttribute{
		Computed: true,
		PlanModifiers: []planmodifier.String{
			stringplanmodifier.UseStateForUnknown(),
		},
		MarkdownDescription: "The resource identifier.",
	},
	"name": schema.StringAttribute{
		Required:            true,
		MarkdownDescription: "The name of the federated realm. May contain 1 to 256 characters; can include UTF-8.",
	},
	"tags": schema.MapAttribute{
		ElementType:         types.StringType,
		Optional:            true,
		Computed:            true,
		Default:             mapdefault.StaticValue(types.MapNull(types.StringType)),
		MarkdownDescription: `The tags for the federation block in JSON format.`,
	},
	"updated_at": schema.StringAttribute{
		CustomType:          timetypes.RFC3339Type{},
		Computed:            true,
		MarkdownDescription: "Time when the object has been updated. Equals to _created_at_ if not updated after creation.",
	},
	"tags_all": schema.MapAttribute{
		ElementType:         types.StringType,
		Computed:            true,
		MarkdownDescription: "The tags of the federation realm in JSON format including default tags.",
	},
}

Functions

func ExpandAllocation

func ExpandAllocation(ctx context.Context, o types.Object, diags *diag.Diagnostics) *ipamfederation.Allocation

func FlattenAllocation

func FlattenAllocation(ctx context.Context, from *ipamfederation.Allocation, diags *diag.Diagnostics) types.Object

func FlattenFederatedBlock

func FlattenFederatedBlock(ctx context.Context, from *ipamfederation.FederatedBlock, diags *diag.Diagnostics) types.Object

func FlattenFederatedRealm

func FlattenFederatedRealm(ctx context.Context, from *ipamfederation.FederatedRealm, diags *diag.Diagnostics) types.Object

func NewFederatedBlockDataSource

func NewFederatedBlockDataSource() datasource.DataSource

func NewFederatedBlockResource

func NewFederatedBlockResource() resource.Resource

func NewFederatedRealmDataSource

func NewFederatedRealmDataSource() datasource.DataSource

func NewFederatedRealmResource

func NewFederatedRealmResource() resource.Resource

Types

type AllocationModel

type AllocationModel struct {
	Allocated   types.Int64 `tfsdk:"allocated"`
	Delegated   types.Int64 `tfsdk:"delegated"`
	Overlapping types.Int64 `tfsdk:"overlapping"`
	Reserved    types.Int64 `tfsdk:"reserved"`
}

func (*AllocationModel) Expand

func (*AllocationModel) Flatten

func (m *AllocationModel) Flatten(ctx context.Context, from *ipamfederation.Allocation, diags *diag.Diagnostics)

type FederatedBlockDataSource

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

FederatedBlockDataSource defines the data source implementation.

func (*FederatedBlockDataSource) Configure

func (*FederatedBlockDataSource) Metadata

func (*FederatedBlockDataSource) Read

func (*FederatedBlockDataSource) Schema

type FederatedBlockModel

type FederatedBlockModel struct {
	Address        types.String      `tfsdk:"address"`
	AllocationV4   types.Object      `tfsdk:"allocation_v4"`
	Cidr           types.Int64       `tfsdk:"cidr"`
	Comment        types.String      `tfsdk:"comment"`
	CreatedAt      timetypes.RFC3339 `tfsdk:"created_at"`
	FederatedRealm types.String      `tfsdk:"federated_realm"`
	Id             types.String      `tfsdk:"id"`
	Name           types.String      `tfsdk:"name"`
	Parent         types.String      `tfsdk:"parent"`
	Protocol       types.String      `tfsdk:"protocol"`
	Tags           types.Map         `tfsdk:"tags"`
	TagsAll        types.Map         `tfsdk:"tags_all"`
	UpdatedAt      timetypes.RFC3339 `tfsdk:"updated_at"`
}

func (*FederatedBlockModel) Expand

func (*FederatedBlockModel) Flatten

type FederatedBlockModelWithFilter

type FederatedBlockModelWithFilter struct {
	Filters    types.Map  `tfsdk:"filters"`
	TagFilters types.Map  `tfsdk:"tag_filters"`
	Results    types.List `tfsdk:"results"`
}

func (*FederatedBlockModelWithFilter) FlattenResults

type FederatedBlockResource

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

FederatedBlockResource defines the resource implementation.

func (*FederatedBlockResource) Configure

func (*FederatedBlockResource) Create

func (*FederatedBlockResource) Delete

func (*FederatedBlockResource) ImportState

func (*FederatedBlockResource) Metadata

func (*FederatedBlockResource) Read

func (*FederatedBlockResource) Schema

func (*FederatedBlockResource) Update

type FederatedRealmDataSource

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

FederatedRealmDataSource defines the data source implementation.

func (*FederatedRealmDataSource) Configure

func (*FederatedRealmDataSource) Metadata

func (*FederatedRealmDataSource) Read

func (*FederatedRealmDataSource) Schema

type FederatedRealmModel

type FederatedRealmModel struct {
	AllocationV4 types.Object      `tfsdk:"allocation_v4"`
	Comment      types.String      `tfsdk:"comment"`
	CreatedAt    timetypes.RFC3339 `tfsdk:"created_at"`
	Id           types.String      `tfsdk:"id"`
	Name         types.String      `tfsdk:"name"`
	Tags         types.Map         `tfsdk:"tags"`
	TagsAll      types.Map         `tfsdk:"tags_all"`
	UpdatedAt    timetypes.RFC3339 `tfsdk:"updated_at"`
}

func (*FederatedRealmModel) Expand

func (*FederatedRealmModel) Flatten

type FederatedRealmModelWithFilter

type FederatedRealmModelWithFilter struct {
	Filters    types.Map  `tfsdk:"filters"`
	TagFilters types.Map  `tfsdk:"tag_filters"`
	Results    types.List `tfsdk:"results"`
}

func (*FederatedRealmModelWithFilter) FlattenResults

type FederatedRealmResource

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

FederatedRealmResource defines the resource implementation.

func (*FederatedRealmResource) Configure

func (*FederatedRealmResource) Create

func (*FederatedRealmResource) Delete

func (*FederatedRealmResource) ImportState

func (*FederatedRealmResource) Metadata

func (*FederatedRealmResource) Read

func (*FederatedRealmResource) Schema

func (*FederatedRealmResource) Update

Jump to

Keyboard shortcuts

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