Documentation ¶
Index ¶
- func NewStorageBucketKeyResource() resource.Resource
- func NewStorageBucketResource() resource.Resource
- func NewStoragePoolResource() resource.Resource
- func NewStorageVolumeResource() resource.Resource
- type SourceVolumeModel
- type StorageBucketKeyModel
- type StorageBucketKeyResource
- func (r *StorageBucketKeyResource) Configure(_ context.Context, req resource.ConfigureRequest, ...)
- func (r StorageBucketKeyResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r StorageBucketKeyResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r StorageBucketKeyResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r StorageBucketKeyResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r StorageBucketKeyResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r StorageBucketKeyResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r StorageBucketKeyResource) SyncState(ctx context.Context, tfState *tfsdk.State, server incus.InstanceServer, ...) diag.Diagnostics
- func (r StorageBucketKeyResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type StorageBucketModel
- type StorageBucketResource
- func (r *StorageBucketResource) Configure(_ context.Context, req resource.ConfigureRequest, ...)
- func (r StorageBucketResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r StorageBucketResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r StorageBucketResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r StorageBucketResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r StorageBucketResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r StorageBucketResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r StorageBucketResource) SyncState(ctx context.Context, tfState *tfsdk.State, server incus.InstanceServer, ...) diag.Diagnostics
- func (r StorageBucketResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type StoragePoolModel
- type StoragePoolResource
- func (r *StoragePoolResource) Configure(_ context.Context, req resource.ConfigureRequest, ...)
- func (r StoragePoolResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r StoragePoolResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r StoragePoolResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r StoragePoolResource) Metadata(_ context.Context, req resource.MetadataRequest, ...)
- func (r StoragePoolResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r StoragePoolResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r StoragePoolResource) SyncState(ctx context.Context, tfState *tfsdk.State, server incus.InstanceServer, ...) diag.Diagnostics
- func (r StoragePoolResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type StorageVolumeModel
- type StorageVolumeResource
- func (r *StorageVolumeResource) Configure(_ context.Context, req resource.ConfigureRequest, ...)
- func (r StorageVolumeResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r StorageVolumeResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r StorageVolumeResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r StorageVolumeResource) Metadata(_ context.Context, req resource.MetadataRequest, ...)
- func (r StorageVolumeResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r StorageVolumeResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r StorageVolumeResource) SyncState(ctx context.Context, tfState *tfsdk.State, server incus.InstanceServer, ...) diag.Diagnostics
- func (r StorageVolumeResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStorageBucketKeyResource ¶ added in v0.0.2
NewStorageBucketKeyResource return a new storage bucket key resource.
func NewStorageBucketResource ¶ added in v0.0.2
NewStorageBucketResource return a new storage bucket resource.
func NewStoragePoolResource ¶
NewStoragePoolResource returns a new storage pool resource.
func NewStorageVolumeResource ¶
NewStorageVolumeResource returns a new storage volume resource.
Types ¶
type SourceVolumeModel ¶ added in v0.2.0
type StorageBucketKeyModel ¶ added in v0.0.2
type StorageBucketKeyModel struct { Name types.String `tfsdk:"name"` Description types.String `tfsdk:"description"` Pool types.String `tfsdk:"pool"` StorageBucket types.String `tfsdk:"storage_bucket"` Role types.String `tfsdk:"role"` Project types.String `tfsdk:"project"` Remote types.String `tfsdk:"remote"` // Computed. AccessKey types.String `tfsdk:"access_key"` SecretKey types.String `tfsdk:"secret_key"` }
type StorageBucketKeyResource ¶ added in v0.0.2
type StorageBucketKeyResource struct {
// contains filtered or unexported fields
}
StorageBucketKeyResource represent Incus storage bucket key resource.
func (*StorageBucketKeyResource) Configure ¶ added in v0.0.2
func (r *StorageBucketKeyResource) Configure(_ context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (StorageBucketKeyResource) Create ¶ added in v0.0.2
func (r StorageBucketKeyResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (StorageBucketKeyResource) Delete ¶ added in v0.0.2
func (r StorageBucketKeyResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (StorageBucketKeyResource) ImportState ¶ added in v0.0.2
func (r StorageBucketKeyResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (StorageBucketKeyResource) Metadata ¶ added in v0.0.2
func (r StorageBucketKeyResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (StorageBucketKeyResource) Read ¶ added in v0.0.2
func (r StorageBucketKeyResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (StorageBucketKeyResource) Schema ¶ added in v0.0.2
func (r StorageBucketKeyResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
TODO: setup proper schema for storage bucket key like volume for pool!
func (StorageBucketKeyResource) SyncState ¶ added in v0.0.2
func (r StorageBucketKeyResource) SyncState(ctx context.Context, tfState *tfsdk.State, server incus.InstanceServer, m StorageBucketKeyModel) diag.Diagnostics
SyncState fetches the server's current state for a storage bucket key and updates the provided model. It then applies this updated model as the new state in Terraform.
func (StorageBucketKeyResource) Update ¶ added in v0.0.2
func (r StorageBucketKeyResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type StorageBucketModel ¶ added in v0.0.2
type StorageBucketModel struct { Name types.String `tfsdk:"name"` Description types.String `tfsdk:"description"` Pool types.String `tfsdk:"pool"` Project types.String `tfsdk:"project"` Target types.String `tfsdk:"target"` Remote types.String `tfsdk:"remote"` Config types.Map `tfsdk:"config"` // Computed. Location types.String `tfsdk:"location"` }
func (StorageBucketModel) ComputedKeys ¶ added in v0.1.2
func (_ StorageBucketModel) ComputedKeys() []string
ComputedKeys returns list of computed config keys.
type StorageBucketResource ¶ added in v0.0.2
type StorageBucketResource struct {
// contains filtered or unexported fields
}
StorageBucketResource represent Incus storage bucket resource.
func (*StorageBucketResource) Configure ¶ added in v0.0.2
func (r *StorageBucketResource) Configure(_ context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (StorageBucketResource) Create ¶ added in v0.0.2
func (r StorageBucketResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (StorageBucketResource) Delete ¶ added in v0.0.2
func (r StorageBucketResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (StorageBucketResource) ImportState ¶ added in v0.0.2
func (r StorageBucketResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (StorageBucketResource) Metadata ¶ added in v0.0.2
func (r StorageBucketResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (StorageBucketResource) Read ¶ added in v0.0.2
func (r StorageBucketResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (StorageBucketResource) Schema ¶ added in v0.0.2
func (r StorageBucketResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (StorageBucketResource) SyncState ¶ added in v0.0.2
func (r StorageBucketResource) SyncState(ctx context.Context, tfState *tfsdk.State, server incus.InstanceServer, m StorageBucketModel) diag.Diagnostics
SyncState fetches the server's current state for a storage bucket and updates the provided model. It then applies this updated model as the new state in Terraform.
func (StorageBucketResource) Update ¶ added in v0.0.2
func (r StorageBucketResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type StoragePoolModel ¶
type StoragePoolModel struct { Name types.String `tfsdk:"name"` Description types.String `tfsdk:"description"` Driver types.String `tfsdk:"driver"` Project types.String `tfsdk:"project"` Target types.String `tfsdk:"target"` Remote types.String `tfsdk:"remote"` Config types.Map `tfsdk:"config"` }
func (StoragePoolModel) ComputedKeys ¶
func (_ StoragePoolModel) ComputedKeys(driver string) []string
ComputedKeys returns list of computed config keys.
type StoragePoolResource ¶
type StoragePoolResource struct {
// contains filtered or unexported fields
}
StoragePoolResource represent Incus storage pool resource.
func (*StoragePoolResource) Configure ¶
func (r *StoragePoolResource) Configure(_ context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (StoragePoolResource) Create ¶
func (r StoragePoolResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (StoragePoolResource) Delete ¶
func (r StoragePoolResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (StoragePoolResource) ImportState ¶
func (r StoragePoolResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (StoragePoolResource) Metadata ¶
func (r StoragePoolResource) Metadata(_ context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (StoragePoolResource) Read ¶
func (r StoragePoolResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (StoragePoolResource) Schema ¶
func (r StoragePoolResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
func (StoragePoolResource) SyncState ¶
func (r StoragePoolResource) SyncState(ctx context.Context, tfState *tfsdk.State, server incus.InstanceServer, m StoragePoolModel) diag.Diagnostics
SyncState fetches the server's current state for a storage pool and updates the provided model. It then applies this updated model as the new state in Terraform.
func (StoragePoolResource) Update ¶
func (r StoragePoolResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type StorageVolumeModel ¶
type StorageVolumeModel struct { Name types.String `tfsdk:"name"` Description types.String `tfsdk:"description"` Pool types.String `tfsdk:"pool"` Type types.String `tfsdk:"type"` ContentType types.String `tfsdk:"content_type"` Project types.String `tfsdk:"project"` Target types.String `tfsdk:"target"` Remote types.String `tfsdk:"remote"` Config types.Map `tfsdk:"config"` SourceVolume types.Object `tfsdk:"source_volume"` // Computed. Location types.String `tfsdk:"location"` }
func (StorageVolumeModel) ComputedKeys ¶
func (_ StorageVolumeModel) ComputedKeys() []string
ComputedKeys returns list of computed config keys.
func (StorageVolumeModel) InheritedStoragePoolVolumeKeys ¶ added in v0.1.2
func (_ StorageVolumeModel) InheritedStoragePoolVolumeKeys(server incus.InstanceServer, poolName string) ([]string, error)
type StorageVolumeResource ¶
type StorageVolumeResource struct {
// contains filtered or unexported fields
}
StorageVolumeResource represent Incus storage volume resource.
func (*StorageVolumeResource) Configure ¶
func (r *StorageVolumeResource) Configure(_ context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (StorageVolumeResource) Create ¶
func (r StorageVolumeResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (StorageVolumeResource) Delete ¶
func (r StorageVolumeResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (StorageVolumeResource) ImportState ¶
func (r StorageVolumeResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (StorageVolumeResource) Metadata ¶
func (r StorageVolumeResource) Metadata(_ context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (StorageVolumeResource) Read ¶
func (r StorageVolumeResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (StorageVolumeResource) Schema ¶
func (r StorageVolumeResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
func (StorageVolumeResource) SyncState ¶
func (r StorageVolumeResource) SyncState(ctx context.Context, tfState *tfsdk.State, server incus.InstanceServer, m StorageVolumeModel) diag.Diagnostics
SyncState fetches the server's current state for a storage volume and updates the provided model. It then applies this updated model as the new state in Terraform.
func (StorageVolumeResource) Update ¶
func (r StorageVolumeResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)