Documentation
¶
Index ¶
- Variables
- func FilterBootDiskFromDisks(disks []oxide.InstanceDiskAttachment, bootDisk oxide.InstanceDiskAttachment) []oxide.InstanceDiskAttachment
- func ModifyPlanForHostnameDeprecation(ctx context.Context, req planmodifier.StringRequest, ...)
- func NewResource() resource.Resource
- type AttachedNICResourceModel
- type EphemeralIPResourceModel
- type ExternalIPResourceModel
- type FloatingIPResourceModel
- type IPConfigResourceModel
- type IPConfigV4ResourceModel
- type IPConfigV6ResourceModel
- type IPStackResourceModel
- type IPStackV4ResourceModel
- type IPStackV6ResourceModel
- type NICResourceModel
- type Resource
- func (r *Resource) Configure(_ context.Context, req resource.ConfigureRequest, ...)
- 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) Metadata(_ context.Context, req resource.MetadataRequest, ...)
- func (r *Resource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *Resource) Schema(ctx context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *Resource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- func (r *Resource) UpgradeState(ctx context.Context) map[int64]resource.StateUpgrader
- type ResourceModel
Constants ¶
This section is empty.
Variables ¶
var AttachedNICType = types.ObjectType{}.WithAttributeTypes( map[string]attr.Type{ "id": types.StringType, "name": types.StringType, "description": types.StringType, "subnet_id": types.StringType, "vpc_id": types.StringType, "instance_id": types.StringType, "primary": types.BoolType, "mac_address": types.StringType, "ip_stack": types.ObjectType{ AttrTypes: map[string]attr.Type{ "v4": types.ObjectType{ AttrTypes: map[string]attr.Type{ "ip": types.StringType, }, }, "v6": types.ObjectType{ AttrTypes: map[string]attr.Type{ "ip": types.StringType, }, }, }, }, "time_created": types.StringType, "time_modified": types.StringType, }, )
Functions ¶
func FilterBootDiskFromDisks ¶
func FilterBootDiskFromDisks( disks []oxide.InstanceDiskAttachment, bootDisk oxide.InstanceDiskAttachment, ) []oxide.InstanceDiskAttachment
func ModifyPlanForHostnameDeprecation ¶
func ModifyPlanForHostnameDeprecation( ctx context.Context, req planmodifier.StringRequest, resp *stringplanmodifier.RequiresReplaceIfFuncResponse, )
ModifyPlanForHostnameDeprecation modifies the plan to support the deprecation of `host_name` in favor of `hostname`. This must be added to both the deprecated `host_name` attribute and the new `hostname` attribute. This function is responsible for setting stringplanmodifier.RequiresReplaceIfFuncResponse.RequiresReplace to `true` when it's deemed the user is actually changing the hostname value in the configuration or `false` when the user is just updating their configuration to comply with the deprecation.
func NewResource ¶
NewResource is a helper function to simplify the provider implementation.
Types ¶
type AttachedNICResourceModel ¶
type AttachedNICResourceModel struct {
ID types.String `tfsdk:"id"`
Name types.String `tfsdk:"name"`
Description types.String `tfsdk:"description"`
SubnetID types.String `tfsdk:"subnet_id"`
VPCID types.String `tfsdk:"vpc_id"`
InstanceID types.String `tfsdk:"instance_id"`
Primary types.Bool `tfsdk:"primary"`
MAC types.String `tfsdk:"mac_address"`
IPStack IPStackResourceModel `tfsdk:"ip_stack"`
TimeCreated types.String `tfsdk:"time_created"`
TimeModified types.String `tfsdk:"time_modified"`
}
type ExternalIPResourceModel ¶
type ExternalIPResourceModel struct {
Ephemeral []EphemeralIPResourceModel `tfsdk:"ephemeral"`
Floating []FloatingIPResourceModel `tfsdk:"floating"`
}
func (*ExternalIPResourceModel) Empty ¶
func (ip *ExternalIPResourceModel) Empty() bool
type FloatingIPResourceModel ¶
type IPConfigResourceModel ¶
type IPConfigResourceModel struct {
V4 *IPConfigV4ResourceModel `tfsdk:"v4"`
V6 *IPConfigV6ResourceModel `tfsdk:"v6"`
}
type IPConfigV4ResourceModel ¶
type IPConfigV6ResourceModel ¶
type IPStackResourceModel ¶
type IPStackResourceModel struct {
V4 *IPStackV4ResourceModel `tfsdk:"v4"`
V6 *IPStackV6ResourceModel `tfsdk:"v6"`
}
type IPStackV4ResourceModel ¶
type IPStackV6ResourceModel ¶
type NICResourceModel ¶
type NICResourceModel struct {
Name types.String `tfsdk:"name"`
Description types.String `tfsdk:"description"`
SubnetID types.String `tfsdk:"subnet_id"`
VPCID types.String `tfsdk:"vpc_id"`
IPConfig IPConfigResourceModel `tfsdk:"ip_config"`
}
func (NICResourceModel) Hash ¶
func (nic NICResourceModel) Hash() string
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
Resource is the resource implementation.
func (*Resource) Configure ¶
func (r *Resource) Configure( _ context.Context, req resource.ConfigureRequest, _ *resource.ConfigureResponse, )
Configure adds the provider configured client to the data source.
func (*Resource) Create ¶
func (r *Resource) Create( ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse, )
Create creates the resource and sets the initial Terraform state.
func (*Resource) Delete ¶
func (r *Resource) Delete( ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse, )
Delete deletes the resource and removes the Terraform state on success.
func (*Resource) ImportState ¶
func (r *Resource) ImportState( ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse, )
ImportState imports an existing instance resource into Terraform state.
func (*Resource) Metadata ¶
func (r *Resource) Metadata( _ context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse, )
Metadata returns the resource type name.
func (*Resource) Read ¶
func (r *Resource) Read( ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse, )
Read refreshes the Terraform state with the latest data.
func (*Resource) Schema ¶
func (r *Resource) Schema( ctx context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse, )
Schema defines the schema for the resource.
func (*Resource) Update ¶
func (r *Resource) Update( ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse, )
Update updates the resource and sets the updated Terraform state on success.
func (*Resource) UpgradeState ¶
type ResourceModel ¶
type ResourceModel struct {
AntiAffinityGroups types.Set `tfsdk:"anti_affinity_groups"`
AutoRestartPolicy types.String `tfsdk:"auto_restart_policy"`
BootDiskID types.String `tfsdk:"boot_disk_id"`
CPUPlatform types.String `tfsdk:"cpu_platform"`
Description types.String `tfsdk:"description"`
DiskAttachments types.Set `tfsdk:"disk_attachments"`
EnableJumboFrames types.Bool `tfsdk:"enable_jumbo_frames"`
ExternalIPs *ExternalIPResourceModel `tfsdk:"external_ips"`
Hostname types.String `tfsdk:"hostname"`
ID types.String `tfsdk:"id"`
Memory types.Int64 `tfsdk:"memory"`
Name types.String `tfsdk:"name"`
NetworkInterfaces []NICResourceModel `tfsdk:"network_interfaces"`
AttachedNetworkInterfaces types.Map `tfsdk:"attached_network_interfaces"`
NCPUs types.Int64 `tfsdk:"ncpus"`
ProjectID types.String `tfsdk:"project_id"`
SSHPublicKeys types.Set `tfsdk:"ssh_public_keys"`
StartOnCreate types.Bool `tfsdk:"start_on_create"`
TimeCreated types.String `tfsdk:"time_created"`
TimeModified types.String `tfsdk:"time_modified"`
Timeouts timeouts.Value `tfsdk:"timeouts"`
UserData types.String `tfsdk:"user_data"`
}