Documentation ¶
Index ¶
- func NewProjectResource() resource.Resource
- type ProjectModel
- type ProjectResource
- func (r *ProjectResource) Configure(_ context.Context, req resource.ConfigureRequest, ...)
- func (r ProjectResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r ProjectResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r ProjectResource) Metadata(_ context.Context, req resource.MetadataRequest, ...)
- func (r ProjectResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r ProjectResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r ProjectResource) SyncState(ctx context.Context, tfState *tfsdk.State, server incus.InstanceServer, ...) diag.Diagnostics
- func (r ProjectResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewProjectResource ¶
NewProjectResource return new project resource.
Types ¶
type ProjectModel ¶
type ProjectModel struct { Name types.String `tfsdk:"name"` Description types.String `tfsdk:"description"` Remote types.String `tfsdk:"remote"` Config types.Map `tfsdk:"config"` }
ProjectModel resource data model that matches the schema.
func (ProjectModel) ComputedKeys ¶
func (_ ProjectModel) ComputedKeys() []string
ComputedKeys returns list of computed config keys.
type ProjectResource ¶
type ProjectResource struct {
// contains filtered or unexported fields
}
ProjectResource represent Incus project resource.
func (*ProjectResource) Configure ¶
func (r *ProjectResource) Configure(_ context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (ProjectResource) Create ¶
func (r ProjectResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (ProjectResource) Delete ¶
func (r ProjectResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (ProjectResource) Metadata ¶
func (r ProjectResource) Metadata(_ context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
Metadata for project resource.
func (ProjectResource) Read ¶
func (r ProjectResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (ProjectResource) Schema ¶
func (r ProjectResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
Schema for project resource.
func (ProjectResource) SyncState ¶
func (r ProjectResource) SyncState(ctx context.Context, tfState *tfsdk.State, server incus.InstanceServer, m ProjectModel) diag.Diagnostics
SyncState fetches the server's current state for a project and updates the provided model. It then applies this updated model as the new state in Terraform.
func (ProjectResource) Update ¶
func (r ProjectResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
Click to show internal directories.
Click to hide internal directories.