Documentation ¶
Index ¶
- func NewProjectDataSource() datasource.DataSource
- func NewProjectResource() resource.Resource
- type ProjectDataSource
- func (d *ProjectDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, ...)
- func (d *ProjectDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (d *ProjectDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *ProjectDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- 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) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- 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 NewProjectDataSource ¶ added in v0.2.0
func NewProjectDataSource() datasource.DataSource
func NewProjectResource ¶
NewProjectResource return new project resource.
Types ¶
type ProjectDataSource ¶ added in v0.2.0
type ProjectDataSource struct {
// contains filtered or unexported fields
}
func (*ProjectDataSource) Configure ¶ added in v0.2.0
func (d *ProjectDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*ProjectDataSource) Metadata ¶ added in v0.2.0
func (d *ProjectDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*ProjectDataSource) Read ¶ added in v0.2.0
func (d *ProjectDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*ProjectDataSource) Schema ¶ added in v0.2.0
func (d *ProjectDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
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) ImportState ¶ added in v0.1.0
func (r *ProjectResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
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.