generic

package
v0.93.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenericRoleBindingResponse

type GenericRoleBindingResponse interface {
	GetRole() string
	GetSubject() string
}

type Model

type Model struct {
	Id         types.String `tfsdk:"id"` // needed by TF
	Region     types.String `tfsdk:"region"`
	ResourceId types.String `tfsdk:"resource_id"`
	Role       types.String `tfsdk:"role"`
	Subject    types.String `tfsdk:"subject"`
}

type RoleBindingResource

type RoleBindingResource[C any] struct {
	ApiName      string // e.g. "iaas", "secretsmanager", ...
	ResourceType string // e.g. "instance", ...

	// callbacks for lifecyle handling
	ApiClientFactory  func(context.Context, *core.ProviderData, *diag.Diagnostics) *C
	ExecReadRequest   func(ctx context.Context, client *C, region, resourceId, role, subject string) (GenericRoleBindingResponse, error)
	ExecCreateRequest func(ctx context.Context, client *C, region, resourceId, role, subject string) (GenericRoleBindingResponse, error)
	ExecUpdateRequest func(ctx context.Context, client *C, region, resourceId, role, subject string) (GenericRoleBindingResponse, error)
	ExecDeleteRequest func(ctx context.Context, client *C, region, resourceId, role, subject string) error
	// contains filtered or unexported fields
}

RoleBindingResource is the resource implementation.

func (*RoleBindingResource[C]) Configure

Configure adds the provider configured client to the resource.

func (*RoleBindingResource[C]) Create

Create creates the resource and sets the initial Terraform state.

func (*RoleBindingResource[C]) Delete

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

func (*RoleBindingResource[C]) ImportState

ImportState imports a resource into the Terraform state on success.

func (*RoleBindingResource[C]) Metadata

Metadata returns the resource type name.

func (*RoleBindingResource[C]) Read

Read refreshes the Terraform state with the latest data.

func (*RoleBindingResource[C]) Schema

Schema defines the schema for the resource.

func (*RoleBindingResource[C]) 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