Documentation
¶
Index ¶
- Variables
- func FlattenSubnetDatabase(ctx context.Context, db linodego.VPCSubnetDatabase) (*types.Object, diag.Diagnostics)
- func FlattenSubnetDatabases(ctx context.Context, subnetDatabases []linodego.VPCSubnetDatabase) (*types.List, diag.Diagnostics)
- func FlattenSubnetLinode(ctx context.Context, linode linodego.VPCSubnetLinode) (*types.Object, diag.Diagnostics)
- func FlattenSubnetLinodeInterface(iface linodego.VPCSubnetLinodeInterface) (types.Object, diag.Diagnostics)
- func FlattenSubnetLinodes(ctx context.Context, subnetLinodes []linodego.VPCSubnetLinode) (*types.List, diag.Diagnostics)
- func NewDataSource() datasource.DataSource
- func NewResource() resource.Resource
- type BaseModel
- type DataSource
- type DataSourceModel
- type DataSourceModelIPv6
- type Resource
- func (r *Resource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *Resource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *Resource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *Resource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *Resource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type ResourceModel
- type ResourceModelIPv6
- type SubnetDatabaseIPv6RangeModel
- type SubnetDatabaseModel
Constants ¶
This section is empty.
Variables ¶
View Source
var DataSourceSchemaIPv6NestedObject = schema.NestedAttributeObject{ Attributes: map[string]schema.Attribute{ "range": schema.StringAttribute{ Description: "An IPv6 range allocated to this subnet.", Computed: true, }, }, }
View Source
var DatabaseObjectType = types.ObjectType{ AttrTypes: map[string]attr.Type{ "id": types.Int64Type, "ipv4_range": types.StringType, "ipv6_ranges": types.ListType{ ElemType: IPV6RangeObjectType, }, }, }
View Source
var IPV6RangeObjectType = types.ObjectType{ AttrTypes: map[string]attr.Type{ "range": types.StringType, }, }
View Source
var LinodeInterfaceObjectType = types.ObjectType{ AttrTypes: map[string]attr.Type{ "id": types.Int64Type, "config_id": types.Int64Type, "active": types.BoolType, }, }
View Source
var LinodeObjectType = types.ObjectType{ AttrTypes: map[string]attr.Type{ "id": types.Int64Type, "interfaces": types.ListType{ ElemType: LinodeInterfaceObjectType, }, }, }
View Source
var ResourceSchemaIPv6NestedObject = schema.NestedAttributeObject{ Attributes: map[string]schema.Attribute{ "range": schema.StringAttribute{ Description: "An existing IPv6 prefix owned by the current account or a " + "forward slash (/) followed by a valid prefix length. " + "If unspecified, a range with the default prefix will be " + "allocated for this VPC.", Optional: true, Computed: true, CustomType: customtypes.LinodeAutoAllocRangeType{}, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplace(), stringplanmodifier.UseStateForUnknown(), }, }, "allocated_range": schema.StringAttribute{ Description: "The IPv6 range assigned to this subnet.", Computed: true, }, }, }
Functions ¶
func FlattenSubnetDatabase ¶ added in v3.9.0
func FlattenSubnetDatabase( ctx context.Context, db linodego.VPCSubnetDatabase, ) (*types.Object, diag.Diagnostics)
func FlattenSubnetDatabases ¶ added in v3.9.0
func FlattenSubnetDatabases( ctx context.Context, subnetDatabases []linodego.VPCSubnetDatabase, ) (*types.List, diag.Diagnostics)
func FlattenSubnetLinode ¶
func FlattenSubnetLinode( ctx context.Context, linode linodego.VPCSubnetLinode, ) (*types.Object, diag.Diagnostics)
func FlattenSubnetLinodeInterface ¶
func FlattenSubnetLinodeInterface(iface linodego.VPCSubnetLinodeInterface) (types.Object, diag.Diagnostics)
func FlattenSubnetLinodes ¶
func FlattenSubnetLinodes( ctx context.Context, subnetLinodes []linodego.VPCSubnetLinode, ) (*types.List, diag.Diagnostics)
func NewDataSource ¶
func NewDataSource() datasource.DataSource
func NewResource ¶
Types ¶
type BaseModel ¶ added in v3.4.0
type BaseModel struct {
ID types.String `tfsdk:"id"`
VPCId types.Int64 `tfsdk:"vpc_id"`
Label types.String `tfsdk:"label"`
IPv4 types.String `tfsdk:"ipv4"`
Linodes types.List `tfsdk:"linodes"`
Created timetypes.RFC3339 `tfsdk:"created"`
Updated timetypes.RFC3339 `tfsdk:"updated"`
Databases types.List `tfsdk:"databases"`
}
func (*BaseModel) FlattenSubnet ¶ added in v3.4.0
type DataSource ¶
type DataSource struct {
helper.BaseDataSource
}
func (*DataSource) Read ¶
func (d *DataSource) Read( ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse, )
type DataSourceModel ¶ added in v3.4.0
func (*DataSourceModel) CopyFrom ¶ added in v3.4.0
func (m *DataSourceModel) CopyFrom(other DataSourceModel, preserveKnown bool)
func (*DataSourceModel) FlattenSubnet ¶ added in v3.4.0
func (m *DataSourceModel) FlattenSubnet( ctx context.Context, subnet *linodego.VPCSubnet, preserveKnown bool, ) diag.Diagnostics
type DataSourceModelIPv6 ¶ added in v3.4.0
type DataSourceModelIPv6 struct {
Range customtypes.LinodeAutoAllocRangeValue `tfsdk:"range"`
}
type Resource ¶
type Resource struct {
helper.BaseResource
}
func (*Resource) Create ¶
func (r *Resource) Create( ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse, )
func (*Resource) Delete ¶
func (r *Resource) Delete( ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse, )
func (*Resource) ImportState ¶
func (r *Resource) ImportState( ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse, )
func (*Resource) Read ¶
func (r *Resource) Read( ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse, )
func (*Resource) Update ¶
func (r *Resource) Update( ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse, )
type ResourceModel ¶ added in v3.4.0
func (*ResourceModel) CopyFrom ¶ added in v3.4.0
func (m *ResourceModel) CopyFrom(other ResourceModel, preserveKnown bool)
func (*ResourceModel) FlattenSubnet ¶ added in v3.4.0
func (m *ResourceModel) FlattenSubnet( ctx context.Context, subnet *linodego.VPCSubnet, preserveKnown bool, ) diag.Diagnostics
type ResourceModelIPv6 ¶ added in v3.4.0
type ResourceModelIPv6 struct {
Range customtypes.LinodeAutoAllocRangeValue `tfsdk:"range"`
AllocatedRange types.String `tfsdk:"allocated_range"`
}
type SubnetDatabaseIPv6RangeModel ¶ added in v3.9.0
Source Files
¶
Click to show internal directories.
Click to hide internal directories.