Documentation
¶
Index ¶
- func NewWorkflowDataSource() datasource.DataSource
- func NewWorkflowResource() resource.Resource
- type WorkflowDataSource
- func (d *WorkflowDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, ...)
- func (d *WorkflowDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (d *WorkflowDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *WorkflowDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type WorkflowDataSourceModel
- type WorkflowResource
- func (r *WorkflowResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *WorkflowResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *WorkflowResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *WorkflowResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *WorkflowResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *WorkflowResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *WorkflowResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *WorkflowResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type WorkflowResourceModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewWorkflowDataSource ¶
func NewWorkflowDataSource() datasource.DataSource
NewWorkflowDataSource creates a new instance of the WorkflowDataSource.
func NewWorkflowResource ¶
Types ¶
type WorkflowDataSource ¶
type WorkflowDataSource struct {
// contains filtered or unexported fields
}
WorkflowDataSource defines the data source implementation for the Terraform utils.
func (*WorkflowDataSource) Configure ¶
func (d *WorkflowDataSource) Configure( ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse, )
Configure configures the data source with the provider's client.
func (*WorkflowDataSource) Metadata ¶
func (d *WorkflowDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
Metadata sets the data source's metadata, such as its type name.
func (*WorkflowDataSource) Read ¶
func (d *WorkflowDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
Read reads data from the external source and sets it in Terraform state.
func (*WorkflowDataSource) Schema ¶
func (d *WorkflowDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
type WorkflowDataSourceModel ¶
type WorkflowDataSourceModel struct { Id types.String `tfsdk:"id" json:"id"` Name types.String `tfsdk:"name" json:"name"` Rules []*workflowRulesModel `tfsdk:"rules" json:"rules"` }
WorkflowDataSourceModel defines the data model for FullWorkflowResultResponseSchema.
type WorkflowResource ¶
type WorkflowResource struct {
// contains filtered or unexported fields
}
WorkflowResource defines the resource implementation.
func (*WorkflowResource) Configure ¶
func (r *WorkflowResource) Configure( ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse, )
func (*WorkflowResource) Create ¶
func (r *WorkflowResource) Create( ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse, )
Create this function is responsible for creating a new resource of type Entitle Workflow.
Its reads the Terraform plan data provided in req.Plan and maps it to the WorkflowResourceModel. And sends a request to the Entitle API to create the resource using API requests. If the creation is successful, it saves the resource's data into Terraform state.
func (*WorkflowResource) Delete ¶
func (r *WorkflowResource) Delete( ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse, )
Delete this function is responsible for deleting an existing resource of type
It reads the resource's data from Terraform state, extracts the unique identifier, and sends a request to delete the resource using API requests. If the deletion is successful, it removes the resource from Terraform state.
func (*WorkflowResource) ImportState ¶
func (r *WorkflowResource) ImportState( ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse, )
ImportState this function is used to import an existing resource's state into Terraform.
It extracts the resource's identifier from the import request and sets it in Terraform state using resource.ImportStatePassthroughID.
func (*WorkflowResource) Metadata ¶
func (r *WorkflowResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*WorkflowResource) Read ¶
func (r *WorkflowResource) Read( ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse, )
Read this function is used to read an existing resource of type Entitle Workflow.
It retrieves the resource's data from the provider API requests. The retrieved data is then mapped to the WorkflowResourceModel, and the data is saved to Terraform state.
func (*WorkflowResource) Schema ¶
func (r *WorkflowResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*WorkflowResource) Update ¶
func (r *WorkflowResource) Update( ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse, )
Update this function handles updates to an existing resource of type Entitle Workflow.
It reads the updated Terraform plan data provided in req.Plan and maps it to the WorkflowResourceModel. And sends a request to the Entitle API to update the resource using API requests. If the update is successful, it saves the updated resource data into Terraform state.