floatingip

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDataSource

func NewDataSource() datasource.DataSource

NewDataSource is a helper to easily construct a DataSource as a type that implements the Terraform data source interface.

func NewResource

func NewResource() resource.Resource

NewResource is a helper to easily construct a Resource as a type that implements the Terraform resource interface.

Types

type DataSource

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

DataSource is the concrete type that implements the necessary Terraform data source interfaces. It holds state to interact with the Oxide API.

func (*DataSource) Configure

Configure sets up necessary data or clients needed by the DataSource.

func (*DataSource) Metadata

Metadata configures the Terraform data source name for the Oxide floating IP data source.

func (*DataSource) Read

Read fetches an Oxide floating IP from the Oxide API.

func (*DataSource) Schema

Schema defines the attributes for this Oxide floating IP data source.

type DataSourceModel

type DataSourceModel struct {
	ID           types.String   `tfsdk:"id"`
	Name         types.String   `tfsdk:"name"`
	Description  types.String   `tfsdk:"description"`
	IP           types.String   `tfsdk:"ip"`
	InstanceID   types.String   `tfsdk:"instance_id"`
	IPPoolID     types.String   `tfsdk:"ip_pool_id"`
	ProjectID    types.String   `tfsdk:"project_id"`
	ProjectName  types.String   `tfsdk:"project_name"`
	TimeCreated  types.String   `tfsdk:"time_created"`
	TimeModified types.String   `tfsdk:"time_modified"`
	Timeouts     timeouts.Value `tfsdk:"timeouts"`
}

DataSourceModel represents the Terraform configuration and state for the Oxide floating IP resource.

type Resource

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

Resource is the concrete type that implements the necessary Terraform resource interfaces. It holds state to interact with the Oxide API.

func (*Resource) Configure

func (f *Resource) Configure(
	ctx context.Context,
	req resource.ConfigureRequest,
	resp *resource.ConfigureResponse,
)

Configure sets up necessary data or clients needed by the Resource.

func (*Resource) Create

func (f *Resource) Create(
	ctx context.Context,
	req resource.CreateRequest,
	resp *resource.CreateResponse,
)

Create creates an Oxide floating IP using the Oxide API.

func (*Resource) Delete

func (f *Resource) Delete(
	ctx context.Context,
	req resource.DeleteRequest,
	resp *resource.DeleteResponse,
)

Delete deletes an Oxide floating IP using the Oxide API.

func (*Resource) ImportState

func (f *Resource) ImportState(
	ctx context.Context,
	req resource.ImportStateRequest,
	resp *resource.ImportStateResponse,
)

ImportState imports an Oxide floating IP using its ID.

func (*Resource) Metadata

func (f *Resource) Metadata(
	ctx context.Context,
	req resource.MetadataRequest,
	resp *resource.MetadataResponse,
)

Metadata configures the Terraform resource name for the Oxide floating IP resource.

func (*Resource) Read

func (f *Resource) Read(
	ctx context.Context,
	req resource.ReadRequest,
	resp *resource.ReadResponse,
)

Read fetches an Oxide floating IP from the Oxide API.

func (*Resource) Schema

func (f *Resource) Schema(
	ctx context.Context,
	req resource.SchemaRequest,
	resp *resource.SchemaResponse,
)

Schema defines the attributes for this Oxide floating IP resource.

func (*Resource) Update

func (f *Resource) Update(
	ctx context.Context,
	req resource.UpdateRequest,
	resp *resource.UpdateResponse,
)

Update updates an Oxide floating IP using the Oxide API. Not all attributes can be updated. Refer to [Schema] and the floating_ip_update Oxide API documentation for more information.

type ResourceModel

type ResourceModel struct {
	ID           types.String      `tfsdk:"id"`
	Name         types.String      `tfsdk:"name"`
	Description  types.String      `tfsdk:"description"`
	IP           iptypes.IPAddress `tfsdk:"ip"`
	InstanceID   types.String      `tfsdk:"instance_id"`
	IPPoolID     types.String      `tfsdk:"ip_pool_id"`
	IPVersion    types.String      `tfsdk:"ip_version"`
	ProjectID    types.String      `tfsdk:"project_id"`
	TimeCreated  types.String      `tfsdk:"time_created"`
	TimeModified types.String      `tfsdk:"time_modified"`
	Timeouts     timeouts.Value    `tfsdk:"timeouts"`
}

ResourceModel represents the Terraform configuration and state for the Oxide floating IP resource.

Jump to

Keyboard shortcuts

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