Documentation
¶
Index ¶
- func NewDataSource() datasource.DataSource
- func NewResource() resource.Resource
- type DataSource
- func (f *DataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, ...)
- func (f *DataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (f *DataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (f *DataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type DataSourceModel
- type Resource
- func (f *Resource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (f *Resource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (f *Resource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (f *Resource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (f *Resource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (f *Resource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (f *Resource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (f *Resource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type ResourceModel
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 ¶
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 ¶
func (f *DataSource) Configure( ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse, )
Configure sets up necessary data or clients needed by the DataSource.
func (*DataSource) Metadata ¶
func (f *DataSource) Metadata( ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse, )
Metadata configures the Terraform data source name for the Oxide floating IP data source.
func (*DataSource) Read ¶
func (f *DataSource) Read( ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse, )
Read fetches an Oxide floating IP from the Oxide API.
func (*DataSource) Schema ¶
func (f *DataSource) Schema( ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse, )
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.