generic

package
v0.118.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 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 DatasourceModel added in v0.94.0

type DatasourceModel struct {
	Id           types.String        `tfsdk:"id"` // needed by TF
	Region       types.String        `tfsdk:"region"`
	ResourceId   types.String        `tfsdk:"resource_id"`
	RoleBindings []nestedRoleBinding `tfsdk:"role_bindings"`
}

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 RoleBindingDatasource added in v0.94.0

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

	// callbacks for lifecyle handling
	ApiClientExtractor func(clientCollection core.ClientCollection) C
	ExecReadRequest    func(ctx context.Context, client C, region, resourceId string) ([]GenericRoleBindingResponse, error)
	// contains filtered or unexported fields
}

RoleBindingDatasource is the resource implementation.

func (*RoleBindingDatasource[C]) Configure added in v0.94.0

Configure adds the provider configured client to the resource.

func (*RoleBindingDatasource[C]) Metadata added in v0.94.0

Metadata returns the resource type name.

func (*RoleBindingDatasource[C]) Read added in v0.94.0

Read refreshes the Terraform state with the latest data.

func (*RoleBindingDatasource[C]) Schema added in v0.94.0

Schema defines the schema for the resource.

type RoleBindingResource

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

	// callbacks for lifecyle handling
	ApiClientExtractor func(clientCollection core.ClientCollection) 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