instancetype

package
v2.20.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

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 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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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