Documentation ¶
Index ¶
- func NewResourceDataSource() datasource.DataSource
- func NewResourceResource() resource.Resource
- type ResourceClient
- type ResourceDataSource
- func (d *ResourceDataSource) Configure(ctx context.Context, request datasource.ConfigureRequest, ...)
- func (d *ResourceDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, ...)
- func (d *ResourceDataSource) Read(ctx context.Context, request datasource.ReadRequest, ...)
- func (d *ResourceDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse)
- type ResourceMethods
- type ResourceModel
- type ResourceResource
- func (r *ResourceResource) Configure(ctx context.Context, request resource.ConfigureRequest, ...)
- func (r *ResourceResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *ResourceResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *ResourceResource) Metadata(_ context.Context, req resource.MetadataRequest, ...)
- func (r *ResourceResource) Read(ctx context.Context, request resource.ReadRequest, ...)
- func (r *ResourceResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *ResourceResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewResourceDataSource ¶
func NewResourceDataSource() datasource.DataSource
func NewResourceResource ¶
NewResourceResource is a helper function to simplify the provider implementation.
Types ¶
type ResourceClient ¶
type ResourceClient struct {
// contains filtered or unexported fields
}
func (*ResourceClient) ResourceCreate ¶
func (r *ResourceClient) ResourceCreate(ctx context.Context, resourcePlan *ResourceModel) error
func (*ResourceClient) ResourceRead ¶
func (d *ResourceClient) ResourceRead(ctx context.Context, data ResourceModel) (ResourceModel, error)
func (*ResourceClient) ResourceUpdate ¶
func (r *ResourceClient) ResourceUpdate(ctx context.Context, resourcePlan *ResourceModel) error
type ResourceDataSource ¶
type ResourceDataSource struct {
ResourceClient
}
func (*ResourceDataSource) Configure ¶
func (d *ResourceDataSource) Configure(ctx context.Context, request datasource.ConfigureRequest, response *datasource.ConfigureResponse)
func (*ResourceDataSource) Metadata ¶
func (d *ResourceDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*ResourceDataSource) Read ¶
func (d *ResourceDataSource) Read(ctx context.Context, request datasource.ReadRequest, response *datasource.ReadResponse)
Read refreshes the Terraform state with the latest data.
func (*ResourceDataSource) Schema ¶
func (d *ResourceDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse)
Schema defines the schema for the data source.
type ResourceMethods ¶
type ResourceMethods interface { ResourceRead(ctx context.Context, data ResourceModel) (ResourceModel, error) ResourceCreate(ctx context.Context, resourcePlan *ResourceModel) error ResourceUpdate(ctx context.Context, resourcePlan *ResourceModel) error }
type ResourceModel ¶
type ResourceModel struct { Id types.String `tfsdk:"id"` OrganizationId types.String `tfsdk:"organization_id"` ProjectId types.String `tfsdk:"project_id"` EnvironmentId types.String `tfsdk:"environment_id"` CreatedAt types.String `tfsdk:"created_at"` UpdatedAt types.String `tfsdk:"updated_at"` Key types.String `tfsdk:"key"` Name types.String `tfsdk:"name"` Urn types.String `tfsdk:"urn"` Description types.String `tfsdk:"description"` Actions map[string]actionsModel `tfsdk:"actions"` Attributes attributesModel `tfsdk:"attributes"` }
type ResourceResource ¶
type ResourceResource struct {
ResourceClient
}
ResourceResource is the resource implementation.
func (*ResourceResource) Configure ¶
func (r *ResourceResource) Configure(ctx context.Context, request resource.ConfigureRequest, response *resource.ConfigureResponse)
func (*ResourceResource) Create ¶
func (r *ResourceResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
Create creates the resource and sets the initial Terraform state.
func (*ResourceResource) Delete ¶
func (r *ResourceResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
Delete deletes the resource and removes the Terraform state on success.
func (*ResourceResource) Metadata ¶
func (r *ResourceResource) Metadata(_ context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
Metadata returns the resource type name.
func (*ResourceResource) Read ¶
func (r *ResourceResource) Read(ctx context.Context, request resource.ReadRequest, response *resource.ReadResponse)
Read refreshes the Terraform state with the latest data.
func (*ResourceResource) Schema ¶
func (r *ResourceResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
Schema defines the schema for the resource.
func (*ResourceResource) Update ¶
func (r *ResourceResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
Update updates the resource and sets the updated Terraform state on success.
Click to show internal directories.
Click to hide internal directories.