Documentation ¶
Index ¶
- Variables
- func New(version string) func() provider.Provider
- func NewFilesystemResource() resource.Resource
- func NewFloatingIPResource() resource.Resource
- func NewImagesDataSource() datasource.DataSource
- func NewInstanceResource() resource.Resource
- func NewInstanceStatusResource() resource.Resource
- func NewSSHKeyResource() resource.Resource
- func NewSecurityGroupResource() resource.Resource
- func NewSnapshotResource() resource.Resource
- func NewVolumeResource() resource.Resource
- func RetryPolicy(ctx context.Context, resp *http.Response, err error) (bool, error)
- type Client
- type ClientConfig
- type ClientLogger
- type CreateFn
- type DataSourceWithClient
- type DataSourceWithTimeout
- type ErrorResponse
- type FilesystemResource
- func (r *FilesystemResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *FilesystemResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *FilesystemResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *FilesystemResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *FilesystemResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *FilesystemResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *FilesystemResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type FilesystemResourceModel
- type FloatingIPResource
- func (r *FloatingIPResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *FloatingIPResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *FloatingIPResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *FloatingIPResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *FloatingIPResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *FloatingIPResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *FloatingIPResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type FloatingIPResourceModel
- type GenesisCloudProvider
- func (p *GenesisCloudProvider) Configure(ctx context.Context, req provider.ConfigureRequest, ...)
- func (p *GenesisCloudProvider) DataSources(ctx context.Context) []func() datasource.DataSource
- func (p *GenesisCloudProvider) Metadata(ctx context.Context, req provider.MetadataRequest, ...)
- func (p *GenesisCloudProvider) Resources(ctx context.Context) []func() resource.Resource
- func (p *GenesisCloudProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)
- type GenesisCloudProviderModel
- type ImageModel
- type ImagesDataSource
- type ImagesDataSourceModel
- type ImagesFilterDataSourceModel
- type InstanceMetadataModel
- type InstanceResource
- func (r *InstanceResource) ConfigValidators(ctx context.Context) []resource.ConfigValidator
- func (r *InstanceResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *InstanceResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *InstanceResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *InstanceResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *InstanceResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *InstanceResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *InstanceResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type InstanceResourceModel
- type InstanceStatusResource
- func (r *InstanceStatusResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *InstanceStatusResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *InstanceStatusResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *InstanceStatusResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *InstanceStatusResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *InstanceStatusResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *InstanceStatusResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type InstanceStatusResourceModel
- type ResourceWithClient
- type ResourceWithTimeout
- type SSHKeyResource
- func (r *SSHKeyResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *SSHKeyResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *SSHKeyResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *SSHKeyResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *SSHKeyResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *SSHKeyResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *SSHKeyResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type SSHKeyResourceModel
- type SecurityGroupResource
- func (r *SecurityGroupResource) ConfigValidators(ctx context.Context) []resource.ConfigValidator
- func (r *SecurityGroupResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *SecurityGroupResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *SecurityGroupResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *SecurityGroupResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *SecurityGroupResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *SecurityGroupResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *SecurityGroupResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type SecurityGroupResourceModel
- type SecurityGroupRuleModel
- type SnapshotResource
- func (r *SnapshotResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *SnapshotResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *SnapshotResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *SnapshotResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *SnapshotResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *SnapshotResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *SnapshotResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type SnapshotResourceModel
- type VolumeResource
- func (r *VolumeResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *VolumeResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *VolumeResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *VolumeResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *VolumeResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *VolumeResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *VolumeResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type VolumeResourceModel
Constants ¶
This section is empty.
Variables ¶
var ErrResourceInErrorState = errors.New("the resource is in error state")
Functions ¶
func NewFilesystemResource ¶ added in v1.1.0
func NewFloatingIPResource ¶ added in v1.1.0
func NewImagesDataSource ¶
func NewImagesDataSource() datasource.DataSource
func NewInstanceResource ¶
func NewInstanceStatusResource ¶ added in v1.1.10
func NewSSHKeyResource ¶
func NewSnapshotResource ¶
func NewVolumeResource ¶
Types ¶
type ClientConfig ¶
type ClientLogger ¶
type ClientLogger struct { retryablehttp.Logger // contains filtered or unexported fields }
func (ClientLogger) Printf ¶
func (l ClientLogger) Printf(format string, a ...interface{})
type DataSourceWithClient ¶
type DataSourceWithClient struct {
// contains filtered or unexported fields
}
func (*DataSourceWithClient) Configure ¶
func (d *DataSourceWithClient) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
type DataSourceWithTimeout ¶
type DataSourceWithTimeout struct { }
func (*DataSourceWithTimeout) ContextWithTimeout ¶
func (d *DataSourceWithTimeout) ContextWithTimeout(ctx context.Context, timeoutFn CreateFn) (context.Context, context.CancelFunc, diag.Diagnostics)
type ErrorResponse ¶
type FilesystemResource ¶ added in v1.1.0
type FilesystemResource struct { ResourceWithClient ResourceWithTimeout }
FilesystemResource defines the resource implementation.
func (*FilesystemResource) Create ¶ added in v1.1.0
func (r *FilesystemResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*FilesystemResource) Delete ¶ added in v1.1.0
func (r *FilesystemResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*FilesystemResource) ImportState ¶ added in v1.1.0
func (r *FilesystemResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*FilesystemResource) Metadata ¶ added in v1.1.0
func (r *FilesystemResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*FilesystemResource) Read ¶ added in v1.1.0
func (r *FilesystemResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*FilesystemResource) Schema ¶ added in v1.1.0
func (r *FilesystemResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*FilesystemResource) Update ¶ added in v1.1.0
func (r *FilesystemResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type FilesystemResourceModel ¶ added in v1.1.0
type FilesystemResourceModel struct { CreatedAt types.String `tfsdk:"created_at"` // Description The human-readable description for the filesystem. Description types.String `tfsdk:"description"` // Id The unique ID of the filesystem. Id types.String `tfsdk:"id"` // Name The human-readable name for the filesystem. Name types.String `tfsdk:"name"` // MountEndpointRange The mount endpoint range for the filesystem. MountEndpointRange types.List `tfsdk:"mount_endpoint_range"` // MountBasePath The base path for the filesystem mount. MountBasePath types.String `tfsdk:"mount_base_path"` // Region The region identifier. Region types.String `tfsdk:"region"` // Size The storage size of this filesystem given in GiB. Size types.Int64 `tfsdk:"size"` // Status The filesystem status. Status types.String `tfsdk:"status"` // Type The storage type of the filesystem. Type types.String `tfsdk:"type"` // RetainOnDelete Flag to retain the filesystem when the resource is deleted. It has to be deleted manually. RetainOnDelete types.Bool `tfsdk:"retain_on_delete"` // Timeouts The resource timeouts Timeouts timeouts.Value `tfsdk:"timeouts"` }
func (*FilesystemResourceModel) PopulateFromClientResponse ¶ added in v1.1.0
func (data *FilesystemResourceModel) PopulateFromClientResponse(ctx context.Context, filesystem *genesiscloud.Filesystem) (diag diag.Diagnostics)
type FloatingIPResource ¶ added in v1.1.0
type FloatingIPResource struct { ResourceWithClient ResourceWithTimeout }
FloatingIPResource defines the resource implementation.
func (*FloatingIPResource) Create ¶ added in v1.1.0
func (r *FloatingIPResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*FloatingIPResource) Delete ¶ added in v1.1.0
func (r *FloatingIPResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*FloatingIPResource) ImportState ¶ added in v1.1.0
func (r *FloatingIPResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*FloatingIPResource) Metadata ¶ added in v1.1.0
func (r *FloatingIPResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*FloatingIPResource) Read ¶ added in v1.1.0
func (r *FloatingIPResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*FloatingIPResource) Schema ¶ added in v1.1.0
func (r *FloatingIPResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*FloatingIPResource) Update ¶ added in v1.1.0
func (r *FloatingIPResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type FloatingIPResourceModel ¶ added in v1.1.0
type FloatingIPResourceModel struct { CreatedAt types.String `tfsdk:"created_at"` // Id The unique ID of the Floating IP. Id types.String `tfsdk:"id"` // Name The human-readable name for the Floating IP. Name types.String `tfsdk:"name"` // IpAddress The IP address of the floating IP. IpAddress types.String `tfsdk:"ip_address"` // IsPublic A boolean value indicating whether the floating IP is public or private. IsPublic types.Bool `tfsdk:"is_public"` // Region The region identifier. Region types.String `tfsdk:"region"` UpdatedAt types.String `tfsdk:"updated_at"` // Status The instance status Status types.String `tfsdk:"status"` // Description The human-readable description for the floating IP. Description types.String `tfsdk:"description"` // Version The IP version of the floating IP. Version types.String `tfsdk:"version"` // Timeouts The resource timeouts Timeouts timeouts.Value `tfsdk:"timeouts"` }
func (*FloatingIPResourceModel) PopulateFromClientResponse ¶ added in v1.1.0
func (data *FloatingIPResourceModel) PopulateFromClientResponse(ctx context.Context, floatingIP *genesiscloud.FloatingIP) (diag diag.Diagnostics)
type GenesisCloudProvider ¶
type GenesisCloudProvider struct {
// contains filtered or unexported fields
}
GenesisCloudProvider defines the provider implementation.
func (*GenesisCloudProvider) Configure ¶
func (p *GenesisCloudProvider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse)
func (*GenesisCloudProvider) DataSources ¶
func (p *GenesisCloudProvider) DataSources(ctx context.Context) []func() datasource.DataSource
func (*GenesisCloudProvider) Metadata ¶
func (p *GenesisCloudProvider) Metadata(ctx context.Context, req provider.MetadataRequest, resp *provider.MetadataResponse)
func (*GenesisCloudProvider) Resources ¶
func (p *GenesisCloudProvider) Resources(ctx context.Context) []func() resource.Resource
func (*GenesisCloudProvider) Schema ¶
func (p *GenesisCloudProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)
type GenesisCloudProviderModel ¶
type GenesisCloudProviderModel struct { Endpoint types.String `tfsdk:"endpoint"` Token types.String `tfsdk:"token"` PollingInterval types.String `tfsdk:"polling_interval"` }
GenesisCloudProviderModel describes the provider data model.
type ImageModel ¶
type ImageModel struct { CreatedAt types.String `tfsdk:"created_at"` // Id A unique number that can be used to identify and reference a specific image. Id types.String `tfsdk:"id"` // Name The display name that has been given to an image. Name types.String `tfsdk:"name"` // Regions The set of regions in which this image can be used in. Regions []types.String `tfsdk:"regions"` // Type Describes the kind of image. Type types.String `tfsdk:"type"` Slug types.String `tfsdk:"slug"` Versions types.List `tfsdk:"versions"` }
func (*ImageModel) PopulateFromClientResponse ¶
func (data *ImageModel) PopulateFromClientResponse(ctx context.Context, image *genesiscloud.Image) (diag diag.Diagnostics)
type ImagesDataSource ¶
type ImagesDataSource struct { DataSourceWithClient DataSourceWithTimeout }
ImagesDataSource defines the data source implementation.
func (*ImagesDataSource) Metadata ¶
func (d *ImagesDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*ImagesDataSource) Read ¶
func (d *ImagesDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*ImagesDataSource) Schema ¶
func (d *ImagesDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
type ImagesDataSourceModel ¶
type ImagesDataSourceModel struct { Filter ImagesFilterDataSourceModel `tfsdk:"filter"` Images []ImageModel `tfsdk:"images"` Id types.String `tfsdk:"id"` // placeholder // Timeouts The data source timeouts Timeouts timeouts.Value `tfsdk:"timeouts"` }
ImagesDataSourceModel describes the data source data model.
type InstanceMetadataModel ¶
type InstanceMetadataModel struct { // StartupScript A plain text bash script or "cloud-config" file that will be executed after the first instance boot. // It is limited to 64 KiB in size. You can use it to configure your instance, e.g. installing the **NVIDIA GPU driver**. // Learn more about [startup scripts and installing the GPU driver](https://support.genesiscloud.com/support/solutions/articles/47001122478). StartupScript types.String `tfsdk:"startup_script"` }
type InstanceResource ¶
type InstanceResource struct { ResourceWithClient ResourceWithTimeout }
InstanceResource defines the resource implementation.
func (*InstanceResource) ConfigValidators ¶
func (r *InstanceResource) ConfigValidators(ctx context.Context) []resource.ConfigValidator
func (*InstanceResource) Create ¶
func (r *InstanceResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*InstanceResource) Delete ¶
func (r *InstanceResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*InstanceResource) ImportState ¶
func (r *InstanceResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*InstanceResource) Metadata ¶
func (r *InstanceResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*InstanceResource) Read ¶
func (r *InstanceResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*InstanceResource) Schema ¶
func (r *InstanceResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*InstanceResource) Update ¶
func (r *InstanceResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type InstanceResourceModel ¶
type InstanceResourceModel struct { CreatedAt types.String `tfsdk:"created_at"` // Hostname The hostname of your instance. Hostname types.String `tfsdk:"hostname"` // DnsName The dns name of your instance. DnsName types.String `tfsdk:"dns_name"` // Id The unique ID of the instance. Id types.String `tfsdk:"id"` // Image The source image or snapshot of the instance. Image types.String `tfsdk:"image"` // ImageId The resulting image ID of the instance. ImageId types.String `tfsdk:"image_id"` // Metadata Option to provide metadata. Currently supported is `startup_script`. Metadata *InstanceMetadataModel `tfsdk:"metadata"` // DiskSize The disk size of the instance in GiB. DiskSize types.Int64 `tfsdk:"disk_size"` // Name The human-readable name for the instance. Name types.String `tfsdk:"name"` // Password The password to access the instance. // Your password must have a minimum length of 16 characters. // **Please Note**: Only one of `ssh_keys` or `password` can be provided. // Password is less secure - we recommend you use an SSH key-pair. Password types.String `tfsdk:"password"` // PlacementOption The placement option identifier in which instances are physically located relative to each other within a zone. PlacementOption types.String `tfsdk:"placement_option"` // PrivateIp The private IPv4 IP-Address (IPv4 address). PrivateIp types.String `tfsdk:"private_ip"` // PublicIp The public IPv4 IP-Address (IPv4 address). PublicIp types.String `tfsdk:"public_ip"` // Region The region identifier. Region types.String `tfsdk:"region"` // SecurityGroupIds The security groups of the instance. SecurityGroupIds types.Set `tfsdk:"security_group_ids"` // SshKeyIds The ssh keys of the instance. SshKeyIds types.Set `tfsdk:"ssh_key_ids"` // Status The instance status Status types.String `tfsdk:"status"` // Type The instance type identifier. Type types.String `tfsdk:"type"` UpdatedAt types.String `tfsdk:"updated_at"` // VolumeIds The volumes of the instance VolumeIds types.Set `tfsdk:"volume_ids"` // FloatingIp The floating IP of the instance. FloatingIpId types.String `tfsdk:"floating_ip_id"` // ReservationId The id of the reservation the instance is associated with. ReservationId types.String `tfsdk:"reservation_id"` // Timeouts The resource timeouts Timeouts timeouts.Value `tfsdk:"timeouts"` }
func (*InstanceResourceModel) PopulateFromClientResponse ¶ added in v1.1.0
func (data *InstanceResourceModel) PopulateFromClientResponse(ctx context.Context, instance *genesiscloud.Instance) (diag diag.Diagnostics)
type InstanceStatusResource ¶ added in v1.1.10
type InstanceStatusResource struct { ResourceWithClient ResourceWithTimeout }
InstanceStatusResource defines the resource implementation.
func (*InstanceStatusResource) Create ¶ added in v1.1.10
func (r *InstanceStatusResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*InstanceStatusResource) Delete ¶ added in v1.1.10
func (r *InstanceStatusResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*InstanceStatusResource) ImportState ¶ added in v1.1.10
func (r *InstanceStatusResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*InstanceStatusResource) Metadata ¶ added in v1.1.10
func (r *InstanceStatusResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*InstanceStatusResource) Read ¶ added in v1.1.10
func (r *InstanceStatusResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*InstanceStatusResource) Schema ¶ added in v1.1.10
func (r *InstanceStatusResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*InstanceStatusResource) Update ¶ added in v1.1.10
func (r *InstanceStatusResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type InstanceStatusResourceModel ¶ added in v1.1.10
type InstanceStatusResourceModel struct { // InstanceId The id of the instance this refers to. InstanceId types.String `tfsdk:"instance_id"` // Status The target instance status. Status types.String `tfsdk:"status"` // Timeouts The resource timeouts Timeouts timeouts.Value `tfsdk:"timeouts"` }
func (*InstanceStatusResourceModel) PopulateFromClientResponse ¶ added in v1.1.10
func (data *InstanceStatusResourceModel) PopulateFromClientResponse(ctx context.Context, instance *genesiscloud.Instance) (diag diag.Diagnostics)
type ResourceWithClient ¶
type ResourceWithClient struct {
// contains filtered or unexported fields
}
func (*ResourceWithClient) Configure ¶
func (r *ResourceWithClient) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
type ResourceWithTimeout ¶
type ResourceWithTimeout struct { }
func (*ResourceWithTimeout) ContextWithTimeout ¶
func (r *ResourceWithTimeout) ContextWithTimeout(ctx context.Context, timeoutFn CreateFn) (context.Context, context.CancelFunc, diag.Diagnostics)
type SSHKeyResource ¶
type SSHKeyResource struct { ResourceWithClient ResourceWithTimeout }
SSHKeyResource defines the resource implementation.
func (*SSHKeyResource) Create ¶
func (r *SSHKeyResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*SSHKeyResource) Delete ¶
func (r *SSHKeyResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*SSHKeyResource) ImportState ¶
func (r *SSHKeyResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*SSHKeyResource) Metadata ¶
func (r *SSHKeyResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*SSHKeyResource) Read ¶
func (r *SSHKeyResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*SSHKeyResource) Schema ¶
func (r *SSHKeyResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*SSHKeyResource) Update ¶
func (r *SSHKeyResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type SSHKeyResourceModel ¶
type SSHKeyResourceModel struct { CreatedAt types.String `tfsdk:"created_at"` // Fingerprint The fingerprint of the SSH key. Fingerprint types.String `tfsdk:"fingerprint"` // Id The unique ID of the SSH key. Id types.String `tfsdk:"id"` // Name The human-readable name for the SSH key. Name types.String `tfsdk:"name"` // PublicKey SSH public key. PublicKey types.String `tfsdk:"public_key"` // Timeouts The resource timeouts Timeouts timeouts.Value `tfsdk:"timeouts"` }
func (*SSHKeyResourceModel) PopulateFromClientResponse ¶ added in v1.1.0
func (data *SSHKeyResourceModel) PopulateFromClientResponse(ctx context.Context, sshKey *genesiscloud.SSHKey) (diag diag.Diagnostics)
type SecurityGroupResource ¶
type SecurityGroupResource struct { ResourceWithClient ResourceWithTimeout }
SecurityGroupResource defines the resource implementation.
func (*SecurityGroupResource) ConfigValidators ¶
func (r *SecurityGroupResource) ConfigValidators(ctx context.Context) []resource.ConfigValidator
func (*SecurityGroupResource) Create ¶
func (r *SecurityGroupResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*SecurityGroupResource) Delete ¶
func (r *SecurityGroupResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*SecurityGroupResource) ImportState ¶
func (r *SecurityGroupResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*SecurityGroupResource) Metadata ¶
func (r *SecurityGroupResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*SecurityGroupResource) Read ¶
func (r *SecurityGroupResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*SecurityGroupResource) Schema ¶
func (r *SecurityGroupResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*SecurityGroupResource) Update ¶
func (r *SecurityGroupResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type SecurityGroupResourceModel ¶
type SecurityGroupResourceModel struct { CreatedAt types.String `tfsdk:"created_at"` // Description The human-readable description for the security group. Description types.String `tfsdk:"description"` // Id The unique ID of the security group. Id types.String `tfsdk:"id"` // Name The human-readable name for the security group. Name types.String `tfsdk:"name"` // Region The region identifier. Region types.String `tfsdk:"region"` // Rules The security group rules. Rules []SecurityGroupRuleModel `tfsdk:"rules"` // Status The security group status. Status types.String `tfsdk:"status"` // Timeouts The resource timeouts Timeouts timeouts.Value `tfsdk:"timeouts"` }
func (*SecurityGroupResourceModel) PopulateFromClientResponse ¶ added in v1.1.0
func (data *SecurityGroupResourceModel) PopulateFromClientResponse(ctx context.Context, securityGroup *genesiscloud.SecurityGroup) (diag diag.Diagnostics)
type SecurityGroupRuleModel ¶
type SecurityGroupRuleModel struct { // Direction The direction of the rule. Direction types.String `tfsdk:"direction"` // PortRangeMax The maximum port number of the rule. PortRangeMax types.Int64 `tfsdk:"port_range_max"` // PortRangeMin The minimum port number of the rule. PortRangeMin types.Int64 `tfsdk:"port_range_min"` // Protocol The protocol of the rule. Protocol types.String `tfsdk:"protocol"` }
type SnapshotResource ¶
type SnapshotResource struct { ResourceWithClient ResourceWithTimeout }
SnapshotResource defines the resource implementation.
func (*SnapshotResource) Create ¶
func (r *SnapshotResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*SnapshotResource) Delete ¶
func (r *SnapshotResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*SnapshotResource) ImportState ¶
func (r *SnapshotResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*SnapshotResource) Metadata ¶
func (r *SnapshotResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*SnapshotResource) Read ¶
func (r *SnapshotResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*SnapshotResource) Schema ¶
func (r *SnapshotResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*SnapshotResource) Update ¶
func (r *SnapshotResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type SnapshotResourceModel ¶
type SnapshotResourceModel struct { CreatedAt types.String `tfsdk:"created_at"` // Id The unique ID of the snapshot. Id types.String `tfsdk:"id"` // Name The human-readable name for the snapshot. Name types.String `tfsdk:"name"` // Region The region identifier. Region types.String `tfsdk:"region"` // InstanceId The id of the instance that was snapshotted. InstanceId types.String `tfsdk:"instance_id"` // Size The storage size of this snapshot given in GiB. Size types.Int64 `tfsdk:"size"` // Status The snapshot status. Status types.String `tfsdk:"status"` // RetainOnDelete Flag to retain the snapshot when the resource is deleted. It has to be deleted manually. RetainOnDelete types.Bool `tfsdk:"retain_on_delete"` // Timeouts The resource timeouts Timeouts timeouts.Value `tfsdk:"timeouts"` }
func (*SnapshotResourceModel) PopulateFromClientResponse ¶ added in v1.1.0
func (data *SnapshotResourceModel) PopulateFromClientResponse(ctx context.Context, snapshot *genesiscloud.Snapshot) (diag diag.Diagnostics)
type VolumeResource ¶
type VolumeResource struct { ResourceWithClient ResourceWithTimeout }
VolumeResource defines the resource implementation.
func (*VolumeResource) Create ¶
func (r *VolumeResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*VolumeResource) Delete ¶
func (r *VolumeResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*VolumeResource) ImportState ¶
func (r *VolumeResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*VolumeResource) Metadata ¶
func (r *VolumeResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*VolumeResource) Read ¶
func (r *VolumeResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*VolumeResource) Schema ¶
func (r *VolumeResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*VolumeResource) Update ¶
func (r *VolumeResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type VolumeResourceModel ¶
type VolumeResourceModel struct { CreatedAt types.String `tfsdk:"created_at"` // Description The human-readable description for the volume. Description types.String `tfsdk:"description"` // Id The unique ID of the volume. Id types.String `tfsdk:"id"` // Name The human-readable name for the volume. Name types.String `tfsdk:"name"` // Region The region identifier. Region types.String `tfsdk:"region"` // Size The storage size of this volume given in GiB. Size types.Int64 `tfsdk:"size"` // Status The volume status. Status types.String `tfsdk:"status"` // Type The storage type of the volume. Type types.String `tfsdk:"type"` // RetainOnDelete Flag to retain the volume when the resource is deleted. It has to be deleted manually. RetainOnDelete types.Bool `tfsdk:"retain_on_delete"` // Timeouts The resource timeouts Timeouts timeouts.Value `tfsdk:"timeouts"` }
func (*VolumeResourceModel) PopulateFromClientResponse ¶ added in v1.1.0
func (data *VolumeResourceModel) PopulateFromClientResponse(ctx context.Context, volume *genesiscloud.Volume) (diag diag.Diagnostics)
Source Files ¶
- client.go
- common.go
- filesystem_resource.go
- filesystem_types.go
- floating_ip_resource.go
- floating_ip_resource_types.go
- images_data_source.go
- images_types.go
- instance_resource.go
- instance_status_resource.go
- instance_status_types.go
- instance_types.go
- provider.go
- security_group_resource.go
- security_group_types.go
- snapshot_resource.go
- snapshot_types.go
- ssh_key_resource.go
- ssh_key_types.go
- timeout.go
- volume_resource.go
- volume_types.go