Documentation ¶
Index ¶
- func NewStoragePoolResource() resource.Resource
- func NewStorageVolumeCopyResource() resource.Resource
- func NewStorageVolumeResource() resource.Resource
- 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 StorageVolumeCopyModel
- type StorageVolumeCopyResource
- func (r *StorageVolumeCopyResource) Configure(_ context.Context, req resource.ConfigureRequest, ...)
- func (r StorageVolumeCopyResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r StorageVolumeCopyResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r StorageVolumeCopyResource) Metadata(_ context.Context, req resource.MetadataRequest, ...)
- func (r StorageVolumeCopyResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r StorageVolumeCopyResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r StorageVolumeCopyResource) 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 NewStoragePoolResource ¶
NewStoragePoolResource returns a new storage pool resource.
func NewStorageVolumeCopyResource ¶
NewStorageVolumeCopyResource returns a new storage volume copy resource.
func NewStorageVolumeResource ¶
NewStorageVolumeResource returns a new storage volume resource.
Types ¶
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 StorageVolumeCopyModel ¶
type StorageVolumeCopyModel struct { Name types.String `tfsdk:"name"` Pool types.String `tfsdk:"pool"` SourceName types.String `tfsdk:"source_name"` SourcePool types.String `tfsdk:"source_pool"` SourceRemote types.String `tfsdk:"source_remote"` Project types.String `tfsdk:"project"` Target types.String `tfsdk:"target"` Remote types.String `tfsdk:"remote"` }
type StorageVolumeCopyResource ¶
type StorageVolumeCopyResource struct {
// contains filtered or unexported fields
}
StorageVolumeCopyResource represent Incus storage volume copy resource.
func (*StorageVolumeCopyResource) Configure ¶
func (r *StorageVolumeCopyResource) Configure(_ context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (StorageVolumeCopyResource) Create ¶
func (r StorageVolumeCopyResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (StorageVolumeCopyResource) Delete ¶
func (r StorageVolumeCopyResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (StorageVolumeCopyResource) Metadata ¶
func (r StorageVolumeCopyResource) Metadata(_ context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (StorageVolumeCopyResource) Read ¶
func (r StorageVolumeCopyResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (StorageVolumeCopyResource) Schema ¶
func (r StorageVolumeCopyResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
func (StorageVolumeCopyResource) Update ¶
func (r StorageVolumeCopyResource) 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"` // Computed. Location types.String `tfsdk:"location"` }
func (StorageVolumeModel) ComputedKeys ¶
func (_ StorageVolumeModel) ComputedKeys() []string
ComputedKeys returns list of computed config keys.
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)