Documentation ¶
Index ¶
- Variables
- func FlattenAddons(ctx context.Context, backup linodego.LinodeAddons) (*basetypes.ListValue, diag.Diagnostics)
- func FlattenBackups(ctx context.Context, backup linodego.LinodeBackupsAddon) (*basetypes.ListValue, diag.Diagnostics)
- func FlattenPrice(ctx context.Context, price linodego.LinodePrice) (*basetypes.ListValue, diag.Diagnostics)
- func FlattenRegionPrices(prices []linodego.LinodeRegionPrice) (*basetypes.ListValue, diag.Diagnostics)
- func NewDataSource() datasource.DataSource
- type DataSource
- type DataSourceModel
Constants ¶
This section is empty.
Variables ¶
View Source
var Attributes = map[string]schema.Attribute{ "id": schema.StringAttribute{ Description: "The unique ID assigned to this Instance type.", Required: true, }, "label": schema.StringAttribute{ Description: "The Linode Type's label is for display purposes only.", Computed: true, Optional: true, }, "disk": schema.Int64Attribute{ Description: "The Disk size, in MB, of the Linode Type.", Computed: true, }, "class": schema.StringAttribute{ Description: "The class of the Linode Type. There are currently three classes of Linodes: nanode, " + "standard, highmem, dedicated", Computed: true, }, "price": schema.ListAttribute{ Description: "Cost in US dollars, broken down into hourly and monthly charges.", Computed: true, ElementType: priceObjectType, }, "addons": schema.ListAttribute{ Description: "Information about the optional Backup service offered for Linodes.", Computed: true, ElementType: addonsObjectType, }, "region_prices": schema.ListAttribute{ Description: "A list of region-specific prices for this plan.", Computed: true, ElementType: regionPriceObjectType, }, "network_out": schema.Int64Attribute{ Description: "The Mbits outbound bandwidth allocation.", Computed: true, }, "memory": schema.Int64Attribute{ Description: "Amount of RAM included in this Linode Type.", Computed: true, }, "transfer": schema.Int64Attribute{ Description: "The monthly outbound transfer amount, in MB.", Computed: true, }, "vcpus": schema.Int64Attribute{ Description: "The number of VCPU cores this Linode Type offers.", Computed: true, }, }
Functions ¶
func FlattenAddons ¶
func FlattenAddons(ctx context.Context, backup linodego.LinodeAddons) ( *basetypes.ListValue, diag.Diagnostics, )
func FlattenBackups ¶
func FlattenBackups(ctx context.Context, backup linodego.LinodeBackupsAddon) ( *basetypes.ListValue, diag.Diagnostics, )
func FlattenPrice ¶
func FlattenPrice(ctx context.Context, price linodego.LinodePrice) ( *basetypes.ListValue, diag.Diagnostics, )
func FlattenRegionPrices ¶
func FlattenRegionPrices(prices []linodego.LinodeRegionPrice) ( *basetypes.ListValue, diag.Diagnostics, )
func NewDataSource ¶
func NewDataSource() datasource.DataSource
Types ¶
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 ¶
type DataSourceModel struct { ID types.String `tfsdk:"id"` Label types.String `tfsdk:"label"` Disk types.Int64 `tfsdk:"disk"` Class types.String `tfsdk:"class"` Price types.List `tfsdk:"price"` Addons types.List `tfsdk:"addons"` RegionPrices types.List `tfsdk:"region_prices"` NetworkOut types.Int64 `tfsdk:"network_out"` Memory types.Int64 `tfsdk:"memory"` Transfer types.Int64 `tfsdk:"transfer"` VCPUs types.Int64 `tfsdk:"vcpus"` }
func (*DataSourceModel) ParseLinodeType ¶
func (data *DataSourceModel) ParseLinodeType( ctx context.Context, linodeType *linodego.LinodeType, ) diag.Diagnostics
Source Files ¶
Click to show internal directories.
Click to hide internal directories.