resources

package
v0.0.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewResourceDataSource

func NewResourceDataSource() datasource.DataSource

func NewResourceResource

func NewResourceResource() resource.Resource

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 (*ResourceDataSource) Metadata

func (*ResourceDataSource) Read

Read refreshes the Terraform state with the latest data.

func (*ResourceDataSource) Schema

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

Create creates the resource and sets the initial Terraform state.

func (*ResourceResource) Delete

Delete deletes the resource and removes the Terraform state on success.

func (*ResourceResource) Metadata

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

Schema defines the schema for the resource.

func (*ResourceResource) Update

Update updates the resource and sets the updated Terraform state on success.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL