cpln

package
v1.2.11 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2025 License: Apache-2.0 Imports: 60 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllowedCustomLocationProviders = []string{"byok"}

AllowedCustomLocationProviders is a list of custom location cloud provider names that are allowed to be used.

View Source
var CloudAccountIdentifiers = []string{"arn:aws:iam::957753459089:user/controlplane-driver", "arn:aws:iam::957753459089:role/controlplane-driver"}

CloudAccountIdentifiers holds the default AWS identifiers

View Source
var CustomLocationCloudProviders = []string{"byok"}

CustomLocationCloudProviders is a list of custom location cloud proivder names.

View Source
var GcpRoles = []string{"roles/viewer", "roles/iam.serviceAccountAdmin", "roles/iam.serviceAccountTokenCreator"}

GcpRoles contains the GCP roles used during the configuration of the cloud account at GCP.

View Source
var GvcScopedKinds = []string{"identity", "workload", "volumeset"}

GvcScopedKinds lists all resource kinds that are scoped within a GVC.

View Source
var IgnoredTagPrefixes = []string{
	"cpln/deployTimestamp",
	"cpln/aws",
	"cpln/azure",
	"cpln/docker",
	"cpln/gcp",
	"cpln/tls",
	constants.ManagedByTerraformTagKey,
	constants.TerraformVersionTagKey,
	"cpln/city",
	"cpln/continent",
	"cpln/country",
	"cpln/state",
}

IgnoredTagPrefixes contains prefixes for tags that should be excluded from processing.

View Source
var OrgName string = os.Getenv("CPLN_ORG")

OrgName retrieves the Control Plane organization name from the CPLN_ORG environment variable for use in tests

Functions

func BoolPointer added in v1.2.0

func BoolPointer(input bool) *bool

BoolPointer returns a pointer to the input bool.

func BuildBool added in v1.2.0

func BuildBool(input types.Bool) *bool

BuildBool converts a types.Bool to a pointer to bool.

func BuildFloat64 added in v1.2.0

func BuildFloat64(input types.Float64) *float64

BuildFloat64 converts a types.Float64 to a pointer to float64.

func BuildInt added in v1.2.0

func BuildInt(input types.Int32) *int

BuildInt converts a types.Int32 to a pointer to int.

func BuildList added in v1.2.0

func BuildList[T any](ctx context.Context, diags *diag.Diagnostics, l types.List) ([]T, bool)

BuildList extracts a slice of blocks of type T from a Terraform types.List.

func BuildMapString added in v1.2.0

func BuildMapString(ctx context.Context, diags *diag.Diagnostics, input types.Map) *map[string]interface{}

BuildMapString converts a Terraform types.Map with tfsdk.StringType into a Go map[string]interface{} with nil entries for null or unknown values.

func BuildQuery added in v1.2.0

func BuildQuery(ctx context.Context, diags *diag.Diagnostics, state types.List) *client.Query

BuildQuery constructs a Query struct from the given Terraform state.

func BuildSet added in v1.2.11

func BuildSet[T any](ctx context.Context, diags *diag.Diagnostics, s types.Set) ([]T, bool)

BuildSet extracts a slice of blocks of type T from a Terraform types.Set.

func BuildSetInt added in v1.2.0

func BuildSetInt(ctx context.Context, diags *diag.Diagnostics, input types.Set) *[]int

BuildSetInt converts a Terraform types.Set with tfsdk.Int32Type into a Go *[]int.

func BuildSetString added in v1.2.0

func BuildSetString(ctx context.Context, diags *diag.Diagnostics, input types.Set) *[]string

BuildSetString converts a Terraform types.Set with tfsdk.StringType into a Go *[]string.

func BuildString added in v1.2.0

func BuildString(input types.String) *string

BuildString converts a types.String to a pointer to string.

func BuildTags added in v1.2.0

func BuildTags(input types.Map) *map[string]interface{}

BuildTags filters and converts a types.Map to *map[string]interface{}.

func BuildTracing added in v1.2.0

func BuildTracing(ctx context.Context, diags *diag.Diagnostics, lightstepTracingState types.List, otelTracingState types.List, cplnTracingState types.List) *client.Tracing

BuildTracing constructs a client.Tracing from Terraform state.

func CanonicalizeEnvoyJSON added in v1.2.0

func CanonicalizeEnvoyJSON(envoyStr string) string

CanonicalizeEnvoyJSON parses the given Envoy JSON string into a generic Go data structure and then marshals it back to JSON.

func ConvertMapToStringMap added in v1.2.0

func ConvertMapToStringMap(input map[string]interface{}) map[string]string

ConvertMapToStringMap converts a map with interface{} values to a map with string values.

func CreateGeneric added in v1.2.0

func CreateGeneric[Plan any, APIObject any](
	ctx context.Context,
	req resource.CreateRequest,
	resp *resource.CreateResponse,
	ops EntityOperations[Plan, APIObject],
)

CreateGeneric executes the create operation for a given resource using provided operations.

func DeleteGeneric added in v1.2.0

func DeleteGeneric[Plan any, APIObject any](
	ctx context.Context,
	req resource.DeleteRequest,
	resp *resource.DeleteResponse,
	ops EntityOperations[Plan, APIObject],
)

DeleteGeneric handles deleting the resource and removing it from the state.

func FlattenFloat64 added in v1.2.0

func FlattenFloat64(input *float64) types.Float64

FlattenFloat64 converts a *float64 into a Terraform types.Float64.

func FlattenInt added in v1.2.0

func FlattenInt(input *int) types.Int32

FlattenInt converts an *int into a Terraform types.Int32.

func FlattenList added in v1.2.0

func FlattenList[T commonmodel.Model](ctx context.Context, diags *diag.Diagnostics, blocks []T) types.List

FlattenList creates a Terraform types.List from a slice of generic Model blocks.

func FlattenMapString added in v1.2.0

func FlattenMapString(input *map[string]interface{}) types.Map

FlattenMapString converts a pointer to a Go map[string]interface{} into a Terraform types.Map.

func FlattenQuery added in v1.2.0

func FlattenQuery(ctx context.Context, diags *diag.Diagnostics, input *client.Query) types.List

FlattenQuery transforms client.Query into a Terraform types.List.

func FlattenSelfLink(links *[]client.Link) types.String

FlattenSelfLink retrieves the "self" link from a list of client.Link objects and returns it as a types.String.

func FlattenSet added in v1.2.11

func FlattenSet[T commonmodel.Model](ctx context.Context, diags *diag.Diagnostics, blocks []T) types.Set

FlattenSet creates a Terraform types.Set from a slice of generic Model blocks.

func FlattenSetInt added in v1.2.0

func FlattenSetInt(input *[]int) types.Set

FlattenSetInt converts a Go *[]int into a Terraform types.Set with tfsdk.Int32Type.

func FlattenSetString added in v1.2.0

func FlattenSetString(input *[]string) types.Set

FlattenSetString converts a Go *[]string into a Terraform types.Set with tfsdk.StringType.

func FlattenTags added in v1.2.0

func FlattenTags(input *map[string]interface{}) types.Map

FlattenTags converts a *map[string]interface{} to a types.Map.

func FlattenTracing added in v1.2.0

func FlattenTracing(ctx context.Context, diags *diag.Diagnostics, input *client.Tracing) (types.List, types.List, types.List)

FlattenTracing transforms a client.Tracing object into separate Terraform types.List values for each provider.

func Float64Pointer added in v1.2.0

func Float64Pointer(input float64) *float64

Float64Pointer returns a pointer to the input float64.

func GetInterface

func GetInterface(s interface{}) *interface{}

GetInterface returns a pointer to the provided interface value, or nil if the input is nil.

func GetNameFromSelfLink(selfLink string) string

GetNameFromSelfLink extracts the resource name from a selfLink string.

func GetSelfLink(orgName string, kind string, name string) string

GetSelfLink construct the self link of the specified resource.

func GetSelfLinkWithGvc added in v1.2.0

func GetSelfLinkWithGvc(orgName string, kind string, gvc string, name string) string

GetSelfLinkWithGvc construct the self link of the specified resource.

func IntPointer added in v1.2.0

func IntPointer(input int) *int

IntPointer returns a pointer to the input int.

func IntSliceToString added in v1.2.0

func IntSliceToString(nums []int) string

IntSliceToString converts a slice of ints to a formatted string representation.

func IntSliceToStringSlice added in v1.2.0

func IntSliceToStringSlice(nums []int) []string

IntSliceToStringSlice converts a slice of ints to a slice of strings.

func IsCustomLocation added in v1.1.47

func IsCustomLocation(provider string) bool

IsCustomLocation checks if the given provider is a custom location provider.

func IsGvcScopedResource added in v1.2.0

func IsGvcScopedResource(kind string) bool

IsGvcScopedResource returns true if the provided kind is scoped to GVC.

func MapToHCL added in v1.2.0

func MapToHCL(dict map[string]interface{}, indentLevel int) string

MapToHCL converts a map of key-value pairs to a formatted HCL block as a string.

func MergeAttributes added in v1.2.0

func MergeAttributes(maps ...map[string]schema.Attribute) map[string]schema.Attribute

MergeAttributes combines multiple maps of schema.Attribute into a single map.

func New added in v1.2.0

func New(version string) func() provider.Provider

New is a helper function to simplify provider server and testing implementation.

func NewAgentResource added in v1.2.0

func NewAgentResource() resource.Resource

NewAgentResource returns a new instance of the resource implementation.

func NewAuditContextResource added in v1.2.0

func NewAuditContextResource() resource.Resource

NewAuditContextResource returns a new instance of the resource implementation.

func NewCloudAccountDataSource added in v1.2.0

func NewCloudAccountDataSource() datasource.DataSource

NewCloudAccountDataSource returns a new instance of the data source implementation.

func NewCloudAccountResource added in v1.2.0

func NewCloudAccountResource() resource.Resource

NewCloudAccountResource returns a new instance of the resource implementation.

func NewCustomLocationResource added in v1.2.0

func NewCustomLocationResource() resource.Resource

NewCustomLocationResource returns a new instance of the resource implementation.

func NewDomainResource added in v1.2.0

func NewDomainResource() resource.Resource

NewDomainResource returns a new instance of the resource implementation.

func NewDomainRouteResource added in v1.2.0

func NewDomainRouteResource() resource.Resource

NewDomainRouteResource returns a new instance of the resource implementation.

func NewGroupResource added in v1.2.0

func NewGroupResource() resource.Resource

NewGroupResource returns a new instance of the resource implementation.

func NewGvcDataSource added in v1.2.0

func NewGvcDataSource() datasource.DataSource

NewGvcDataSource returns a new instance of the data source implementation.

func NewGvcResource added in v1.2.0

func NewGvcResource() resource.Resource

NewGvcResource returns a new instance of the resource implementation.

func NewIdentityResource added in v1.2.0

func NewIdentityResource() resource.Resource

NewIdentityResource returns a new instance of the resource implementation.

func NewImageDataSource added in v1.2.0

func NewImageDataSource() datasource.DataSource

NewImageDataSource returns a new instance of the data source implementation.

func NewImagesDataSource added in v1.2.0

func NewImagesDataSource() datasource.DataSource

NewImagesDataSource returns a new instance of the data source implementation.

func NewIpSetResource added in v1.2.0

func NewIpSetResource() resource.Resource

NewIpSetResource returns a new instance of the resource implementation.

func NewLocationDataSource added in v1.2.0

func NewLocationDataSource() datasource.DataSource

NewLocationDataSource returns a new instance of the data source implementation.

func NewLocationResource added in v1.2.0

func NewLocationResource() resource.Resource

NewLocationResource returns a new instance of the resource implementation.

func NewLocationsDataSource added in v1.2.0

func NewLocationsDataSource() datasource.DataSource

NewLocationsDataSource returns a new instance of the data source implementation.

func NewMk8sKubeconfigResource added in v1.2.0

func NewMk8sKubeconfigResource() resource.Resource

NewMk8sKubeconfigResource returns a new instance of the resource implementation.

func NewMk8sResource added in v1.2.0

func NewMk8sResource() resource.Resource

NewMk8sResource returns a new instance of the resource implementation.

func NewOrgDataSource added in v1.2.0

func NewOrgDataSource() datasource.DataSource

NewOrgDataSource returns a new instance of the data source implementation.

func NewOrgLoggingResource added in v1.2.0

func NewOrgLoggingResource() resource.Resource

NewOrgLoggingResource returns a new instance of the resource implementation.

func NewOrgResource added in v1.2.0

func NewOrgResource() resource.Resource

NewOrgResource returns a new instance of the resource implementation.

func NewOrgTracingResource added in v1.2.0

func NewOrgTracingResource() resource.Resource

NewOrgTracingResource returns a new instance of the resource implementation.

func NewPolicyResource added in v1.2.0

func NewPolicyResource() resource.Resource

NewPolicyResource returns a new instance of the resource implementation.

func NewSecretDataSource added in v1.2.0

func NewSecretDataSource() datasource.DataSource

NewSecretDataSource returns a new instance of the data source implementation.

func NewSecretResource added in v1.2.0

func NewSecretResource() resource.Resource

NewSecretResource returns a new instance of the resource implementation.

func NewServiceAccountKeyResource added in v1.2.0

func NewServiceAccountKeyResource() resource.Resource

NewServiceAccountKeyResource returns a new instance of the resource implementation.

func NewServiceAccountResource added in v1.2.0

func NewServiceAccountResource() resource.Resource

NewServiceAccountResource returns a new instance of the resource implementation.

func NewVolumeSetResource added in v1.2.0

func NewVolumeSetResource() resource.Resource

NewVolumeSetResource returns a new instance of the resource implementation.

func NewWorkloadResource added in v1.2.0

func NewWorkloadResource() resource.Resource

NewWorkloadResource returns a new instance of the resource implementation.

func ParseValueAndUnit added in v1.2.0

func ParseValueAndUnit(value string) (int, string)

ParseValueAndUnit extracts the numeric value and unit from a resource quantity string.

func PreserveJSONFormatting added in v1.2.0

func PreserveJSONFormatting(raw interface{}, plan types.String) types.String

PreserveJSONFormatting returns the plan value if both raw API string and plan string parse to semantically identical JSON, otherwise returns the API string value.

func ReadGeneric added in v1.2.0

func ReadGeneric[Plan any, APIObject any](
	ctx context.Context,
	req resource.ReadRequest,
	resp *resource.ReadResponse,
	ops EntityOperations[Plan, APIObject],
)

ReadGeneric handles reading the entity state and removes entity on 404.

func StringPointer added in v1.2.0

func StringPointer(input string) *string

StringPointer returns a pointer to the input string.

func StringPointerFromInterface added in v1.2.0

func StringPointerFromInterface(input interface{}) *string

StringPointerFromInterface converts an interface{} to a *string.

func StringSliceToString added in v1.2.0

func StringSliceToString(items []string) string

StringSliceToString returns a string representation of the string slice.

func StringifyStringValue added in v1.2.5

func StringifyStringValue(v types.String) string

StringifyStringValue converts a types.String into a readable string representation

func ToStringSlice added in v1.2.0

func ToStringSlice(ifaces []interface{}) []string

ToStringSlice converts a slice of interface{} to a slice of strings, returning an error if any element is not a string.

func UpdateGeneric added in v1.2.0

func UpdateGeneric[Plan any, APIObject any](
	ctx context.Context,
	req resource.UpdateRequest,
	resp *resource.UpdateResponse,
	ops EntityOperations[Plan, APIObject],
)

UpdateGeneric handles updating the resource based on the planned changes.

Types

type AgentResource added in v1.2.0

type AgentResource struct {
	EntityBase
	Operations EntityOperations[AgentResourceModel, client.Agent]
}

AgentResource is the resource implementation.

func (*AgentResource) Configure added in v1.2.0

Configure configures the resource before use.

func (*AgentResource) Create added in v1.2.0

Create creates the resource.

func (*AgentResource) Delete added in v1.2.0

Delete removes the resource.

func (*AgentResource) ImportState added in v1.2.0

ImportState sets up the import operation to map the imported ID to the "id" attribute in the state.

func (*AgentResource) Metadata added in v1.2.0

Metadata provides the resource type name.

func (*AgentResource) Read added in v1.2.0

Read fetches the current state of the resource.

func (*AgentResource) Schema added in v1.2.0

Schema defines the schema for the resource.

func (*AgentResource) Update added in v1.2.0

Update modifies the resource.

type AgentResourceModel added in v1.2.0

type AgentResourceModel struct {
	EntityBaseModel
	UserData types.String `tfsdk:"user_data"`
}

AgentResourceModel holds the Terraform state for the resource.

type AgentResourceOperator added in v1.2.0

type AgentResourceOperator struct {
	EntityOperator[AgentResourceModel]
}

AgentResourceOperator is the operator for managing the state.

func (*AgentResourceOperator) InvokeCreate added in v1.2.0

func (aro *AgentResourceOperator) InvokeCreate(req client.Agent) (*client.Agent, int, error)

InvokeCreate invokes the Create API to create a new resource.

func (*AgentResourceOperator) InvokeDelete added in v1.2.0

func (aro *AgentResourceOperator) InvokeDelete(name string) error

InvokeDelete invokes the Delete API to delete a resource by name.

func (*AgentResourceOperator) InvokeRead added in v1.2.0

func (aro *AgentResourceOperator) InvokeRead(name string) (*client.Agent, int, error)

InvokeRead invokes the Get API to retrieve an existing resource by name.

func (*AgentResourceOperator) InvokeUpdate added in v1.2.0

func (aro *AgentResourceOperator) InvokeUpdate(req client.Agent) (*client.Agent, int, error)

InvokeUpdate invokes the Update API to update an existing resource.

func (*AgentResourceOperator) MapResponseToState added in v1.2.0

func (aro *AgentResourceOperator) MapResponseToState(agent *client.Agent, isCreate bool) AgentResourceModel

MapResponseToState constructs the Terraform state model from the API response payload.

func (*AgentResourceOperator) NewAPIRequest added in v1.2.0

func (aro *AgentResourceOperator) NewAPIRequest(isUpdate bool) client.Agent

NewAPIRequest creates a request payload from a state model.

type AuditContextResource added in v1.2.0

type AuditContextResource struct {
	EntityBase
	Operations EntityOperations[AuditContextResourceModel, client.AuditContext]
}

AuditContextResource is the resource implementation.

func (*AuditContextResource) Configure added in v1.2.0

Configure configures the resource before use.

func (*AuditContextResource) Create added in v1.2.0

Create creates the resource.

func (*AuditContextResource) Delete added in v1.2.0

Delete removes the resource.

func (*AuditContextResource) ImportState added in v1.2.0

ImportState sets up the import operation to map the imported ID to the "id" attribute in the state.

func (*AuditContextResource) Metadata added in v1.2.0

Metadata provides the resource type name.

func (*AuditContextResource) Read added in v1.2.0

Read fetches the current state of the resource.

func (*AuditContextResource) Schema added in v1.2.0

Schema defines the schema for the resource.

func (*AuditContextResource) Update added in v1.2.0

Update modifies the resource.

type AuditContextResourceModel added in v1.2.0

type AuditContextResourceModel struct {
	EntityBaseModel
}

AuditContextResourceModel holds the Terraform state for the resource.

type AuditContextResourceOperator added in v1.2.0

type AuditContextResourceOperator struct {
	EntityOperator[AuditContextResourceModel]
}

AuditContextResourceOperator is the operator for managing the state.

func (*AuditContextResourceOperator) InvokeCreate added in v1.2.0

InvokeCreate invokes the Create API to create a new resource.

func (*AuditContextResourceOperator) InvokeDelete added in v1.2.0

func (acro *AuditContextResourceOperator) InvokeDelete(name string) error

InvokeDelete invokes the Delete API to delete a resource by name.

func (*AuditContextResourceOperator) InvokeRead added in v1.2.0

func (acro *AuditContextResourceOperator) InvokeRead(name string) (*client.AuditContext, int, error)

InvokeRead invokes the Get API to retrieve an existing resource by name.

func (*AuditContextResourceOperator) InvokeUpdate added in v1.2.0

InvokeUpdate invokes the Update API to update an existing resource.

func (*AuditContextResourceOperator) MapResponseToState added in v1.2.0

func (acro *AuditContextResourceOperator) MapResponseToState(auditctx *client.AuditContext, isCreate bool) AuditContextResourceModel

MapResponseToState constructs the Terraform state model from the API response payload.

func (*AuditContextResourceOperator) NewAPIRequest added in v1.2.0

func (acro *AuditContextResourceOperator) NewAPIRequest(isUpdate bool) client.AuditContext

NewAPIRequest creates a request payload from a state model.

type CloudAccountDataSource added in v1.2.0

type CloudAccountDataSource struct {
	// contains filtered or unexported fields
}

CloudAccountDataSource is the data source implementation.

func (*CloudAccountDataSource) Configure added in v1.2.0

Configure configures the data source before use.

func (*CloudAccountDataSource) Metadata added in v1.2.0

Metadata provides the data source type name.

func (*CloudAccountDataSource) Read added in v1.2.0

Read retrieves the AWS identifiers for the given cloud account ID and sets the data source state.

func (*CloudAccountDataSource) Schema added in v1.2.0

Schema defines the schema for the data source.

type CloudAccountDataSourceModel added in v1.2.0

type CloudAccountDataSourceModel struct {
	Id             types.String `tfsdk:"id"`
	AwsIdentifiers types.Set    `tfsdk:"aws_identifiers"`
}

CloudAccountDataSourceModel holds the Terraform state for the data source.

type CloudAccountResource added in v1.2.0

type CloudAccountResource struct {
	EntityBase
	Operations EntityOperations[CloudAccountResourceModel, client.CloudAccount]
}

CloudAccountResource is the resource implementation.

func (*CloudAccountResource) ConfigValidators added in v1.2.0

func (car *CloudAccountResource) ConfigValidators(ctx context.Context) []resource.ConfigValidator

ConfigValidators enforces mutual exclusivity between attributes.

func (*CloudAccountResource) Configure added in v1.2.0

Configure configures the resource before use.

func (*CloudAccountResource) Create added in v1.2.0

Create creates the resource.

func (*CloudAccountResource) Delete added in v1.2.0

Delete removes the resource.

func (*CloudAccountResource) ImportState added in v1.2.0

ImportState sets up the import operation to map the imported ID to the "id" attribute in the state.

func (*CloudAccountResource) Metadata added in v1.2.0

Metadata provides the resource type name.

func (*CloudAccountResource) Read added in v1.2.0

Read fetches the current state of the resource.

func (*CloudAccountResource) RequiresReplaceOnChangeOrRemoval added in v1.2.0

func (car *CloudAccountResource) RequiresReplaceOnChangeOrRemoval() planmodifier.String

RequiresReplaceOnChangeOrRemoval returns a plan modifier that recreates the resource when an existing string attribute is modified or removed.

func (*CloudAccountResource) Schema added in v1.2.0

Schema defines the schema for the resource.

func (*CloudAccountResource) Update added in v1.2.0

Update modifies the resource.

type CloudAccountResourceModel added in v1.2.0

type CloudAccountResourceModel struct {
	EntityBaseModel
	Aws                   types.List   `tfsdk:"aws"`
	Azure                 types.List   `tfsdk:"azure"`
	Gcp                   types.List   `tfsdk:"gcp"`
	Ngs                   types.List   `tfsdk:"ngs"`
	GcpServiceAccountName types.String `tfsdk:"gcp_service_account_name"`
	GcpRoles              types.Set    `tfsdk:"gcp_roles"`
}

CloudAccountResourceModel holds the Terraform state for the resource.

type CloudAccountResourceOperator added in v1.2.0

type CloudAccountResourceOperator struct {
	EntityOperator[CloudAccountResourceModel]
}

CloudAccountResourceOperator is the operator for managing the state.

func (*CloudAccountResourceOperator) InvokeCreate added in v1.2.0

InvokeCreate invokes the Create API to create a new resource.

func (*CloudAccountResourceOperator) InvokeDelete added in v1.2.0

func (caro *CloudAccountResourceOperator) InvokeDelete(name string) error

InvokeDelete invokes the Delete API to delete a resource by name.

func (*CloudAccountResourceOperator) InvokeRead added in v1.2.0

func (caro *CloudAccountResourceOperator) InvokeRead(name string) (*client.CloudAccount, int, error)

InvokeRead invokes the Get API to retrieve an existing resource by name.

func (*CloudAccountResourceOperator) InvokeUpdate added in v1.2.0

InvokeUpdate invokes the Update API to update an existing resource.

func (*CloudAccountResourceOperator) MapResponseToState added in v1.2.0

func (caro *CloudAccountResourceOperator) MapResponseToState(cloudAccount *client.CloudAccount, isCreate bool) CloudAccountResourceModel

MapResponseToState creates a state model from response payload.

func (*CloudAccountResourceOperator) NewAPIRequest added in v1.2.0

func (caro *CloudAccountResourceOperator) NewAPIRequest(isUpdate bool) client.CloudAccount

NewAPIRequest creates a request payload from a state model.

type CplnProvider added in v1.2.0

type CplnProvider struct {
	// contains filtered or unexported fields
}

CplnProvider is the provider implementation.

func (*CplnProvider) Configure added in v1.2.0

Configure prepares a Control Plane API client for data sources and resources.

func (*CplnProvider) DataSources added in v1.2.0

func (p *CplnProvider) DataSources(_ context.Context) []func() datasource.DataSource

DataSources defines the data sources implemented in the provider.

func (*CplnProvider) Metadata added in v1.2.0

Metadata returns the provider type name.

func (*CplnProvider) Resources added in v1.2.0

func (p *CplnProvider) Resources(_ context.Context) []func() resource.Resource

Resources defines the resources implemented in the provider.

func (*CplnProvider) Schema added in v1.2.0

Schema defines the provider-level schema for configuration data.

type CplnProviderModel added in v1.2.0

type CplnProviderModel struct {
	Org          types.String `tfsdk:"org"`
	Endpoint     types.String `tfsdk:"endpoint"`
	Profile      types.String `tfsdk:"profile"`
	Token        types.String `tfsdk:"token"`
	RefreshToken types.String `tfsdk:"refresh_token"`
}

CplnProviderModel maps provider schema data to a Go type.

type CustomLocationResource added in v1.2.0

type CustomLocationResource struct {
	EntityBase
	Operations EntityOperations[CustomLocationResourceModel, client.Location]
}

CustomLocationResource is the resource implementation.

func (*CustomLocationResource) Configure added in v1.2.0

Configure configures the resource before use.

func (*CustomLocationResource) Create added in v1.2.0

Create creates the resource.

func (*CustomLocationResource) Delete added in v1.2.0

Delete removes the resource.

func (*CustomLocationResource) ImportState added in v1.2.0

ImportState sets up the import operation to map the imported ID to the "id" attribute in the state.

func (*CustomLocationResource) Metadata added in v1.2.0

Metadata provides the resource type name.

func (*CustomLocationResource) Read added in v1.2.0

Read fetches the current state of the resource.

func (*CustomLocationResource) Schema added in v1.2.0

Schema defines the schema for the resource.

func (*CustomLocationResource) Update added in v1.2.0

Update modifies the resource.

type CustomLocationResourceModel added in v1.2.0

type CustomLocationResourceModel struct {
	EntityBaseModel
	CloudProvider types.String `tfsdk:"cloud_provider"`
	Region        types.String `tfsdk:"region"`
	Enabled       types.Bool   `tfsdk:"enabled"`
}

CustomLocationResourceModel holds the Terraform state for the resource.

type CustomLocationResourceOperator added in v1.2.0

type CustomLocationResourceOperator struct {
	EntityOperator[CustomLocationResourceModel]
}

CustomLocationResourceOperator is the operator for managing the state.

func (*CustomLocationResourceOperator) InvokeCreate added in v1.2.0

func (clro *CustomLocationResourceOperator) InvokeCreate(req client.Location) (*client.Location, int, error)

InvokeCreate invokes the Create API to create a new resource.

func (*CustomLocationResourceOperator) InvokeDelete added in v1.2.0

func (clro *CustomLocationResourceOperator) InvokeDelete(name string) error

InvokeDelete invokes the Delete API to delete a resource by name.

func (*CustomLocationResourceOperator) InvokeRead added in v1.2.0

func (clro *CustomLocationResourceOperator) InvokeRead(name string) (*client.Location, int, error)

InvokeRead invokes the Get API to retrieve an existing resource by name.

func (*CustomLocationResourceOperator) InvokeUpdate added in v1.2.0

func (clro *CustomLocationResourceOperator) InvokeUpdate(req client.Location) (*client.Location, int, error)

InvokeUpdate invokes the Update API to update an existing resource.

func (*CustomLocationResourceOperator) MapResponseToState added in v1.2.0

func (clro *CustomLocationResourceOperator) MapResponseToState(location *client.Location, isCreate bool) CustomLocationResourceModel

MapResponseToState creates a state model from response payload.

func (*CustomLocationResourceOperator) NewAPIRequest added in v1.2.0

func (clro *CustomLocationResourceOperator) NewAPIRequest(isUpdate bool) client.Location

NewAPIRequest creates a request payload from a state model.

type DomainResource added in v1.2.0

type DomainResource struct {
	EntityBase
	Operations EntityOperations[DomainResourceModel, client.Domain]
}

DomainResource is the resource implementation.

func (*DomainResource) CertificateSchema added in v1.2.0

func (dr *DomainResource) CertificateSchema(description string) schema.NestedBlockObject

CertificateSchema creates a nested block schema using the provided description.

func (*DomainResource) Configure added in v1.2.0

Configure configures the resource before use.

func (*DomainResource) Create added in v1.2.0

Create creates the resource.

func (*DomainResource) Delete added in v1.2.0

Delete removes the resource.

func (*DomainResource) ImportState added in v1.2.0

ImportState sets up the import operation to map the imported ID to the "id" attribute in the state.

func (*DomainResource) Metadata added in v1.2.0

Metadata provides the resource type name.

func (*DomainResource) ModifyPlan added in v1.2.5

ModifyPlan handles plan modifications.

func (*DomainResource) Read added in v1.2.0

Read fetches the current state of the resource.

func (*DomainResource) Schema added in v1.2.0

Schema defines the schema for the resource.

func (*DomainResource) Update added in v1.2.0

Update modifies the resource.

type DomainResourceModel added in v1.2.0

type DomainResourceModel struct {
	EntityBaseModel
	Spec   types.List `tfsdk:"spec"`
	Status types.List `tfsdk:"status"`
}

DomainResourceModel holds the Terraform state for the resource.

type DomainResourceOperator added in v1.2.0

type DomainResourceOperator struct {
	EntityOperator[DomainResourceModel]
}

DomainResourceOperator is the operator for managing the state.

func (*DomainResourceOperator) InvokeCreate added in v1.2.0

func (dro *DomainResourceOperator) InvokeCreate(req client.Domain) (*client.Domain, int, error)

InvokeCreate invokes the Create API to create a new resource.

func (*DomainResourceOperator) InvokeDelete added in v1.2.0

func (dro *DomainResourceOperator) InvokeDelete(name string) error

InvokeDelete invokes the Delete API to delete a resource by name.

func (*DomainResourceOperator) InvokeRead added in v1.2.0

func (dro *DomainResourceOperator) InvokeRead(name string) (*client.Domain, int, error)

InvokeRead invokes the Get API to retrieve an existing resource by name.

func (*DomainResourceOperator) InvokeUpdate added in v1.2.0

func (dro *DomainResourceOperator) InvokeUpdate(req client.Domain) (*client.Domain, int, error)

InvokeUpdate invokes the Update API to update an existing resource.

func (*DomainResourceOperator) MapResponseToState added in v1.2.0

func (dro *DomainResourceOperator) MapResponseToState(domain *client.Domain, isCreate bool) DomainResourceModel

MapResponseToState creates a state model from response payload.

func (*DomainResourceOperator) NewAPIRequest added in v1.2.0

func (dro *DomainResourceOperator) NewAPIRequest(isUpdate bool) client.Domain

NewAPIRequest creates a request payload from a state model.

type DomainRouteResource added in v1.2.0

type DomainRouteResource struct {
	EntityBase
}

DomainRouteResource is the resource implementation.

func (*DomainRouteResource) ConfigValidators added in v1.2.0

func (drr *DomainRouteResource) ConfigValidators(ctx context.Context) []resource.ConfigValidator

ConfigValidators enforces mutual exclusivity between attributes.

func (*DomainRouteResource) Configure added in v1.2.0

Configure configures the resource before use.

func (*DomainRouteResource) Create added in v1.2.0

Create creates the resource.

func (*DomainRouteResource) Delete added in v1.2.0

Delete removes the resource.

func (*DomainRouteResource) ImportState added in v1.2.0

ImportState sets up the import operation to map the imported ID to the "id" attribute in the state.

func (*DomainRouteResource) Metadata added in v1.2.0

Metadata provides the resource type name.

func (*DomainRouteResource) Read added in v1.2.0

Read fetches the current state of the resource.

func (*DomainRouteResource) Schema added in v1.2.0

Schema defines the schema for the resource.

func (*DomainRouteResource) Update added in v1.2.0

Update modifies the resource.

type DomainRouteResourceModel added in v1.2.0

type DomainRouteResourceModel struct {
	ID            types.String `tfsdk:"id"`
	DomainLink    types.String `tfsdk:"domain_link"`
	DomainPort    types.Int32  `tfsdk:"domain_port"`
	Prefix        types.String `tfsdk:"prefix"`
	ReplacePrefix types.String `tfsdk:"replace_prefix"`
	Regex         types.String `tfsdk:"regex"`
	WorkloadLink  types.String `tfsdk:"workload_link"`
	Port          types.Int32  `tfsdk:"port"`
	HostPrefix    types.String `tfsdk:"host_prefix"`
	HostRegex     types.String `tfsdk:"host_regex"`
	Headers       types.List   `tfsdk:"headers"`
	Replica       types.Int32  `tfsdk:"replica"`
}

DomainRouteResourceModel holds the Terraform state for the resource.

type EntityBase added in v1.2.0

type EntityBase struct {
	IsNameComputed        bool
	IsDescriptionComputed bool
	RequiresReplace       func() planmodifier.String
	// contains filtered or unexported fields
}

EntityBase is the base entity (resource/data-source) implementation.

func (*EntityBase) ControlPlaneTracingSchema added in v1.2.0

func (r *EntityBase) ControlPlaneTracingSchema() schema.ListNestedBlock

ControlPlaneTracingSchema returns the nested block schema for query configuration.

func (*EntityBase) CustomTagsTracingSchema added in v1.2.0

func (r *EntityBase) CustomTagsTracingSchema() schema.MapAttribute

CustomTagsTracingSchema returns the nested block schema for query configuration.

func (*EntityBase) DescriptionSchema added in v1.2.0

func (r *EntityBase) DescriptionSchema(entityName string) schema.StringAttribute

DescriptionSchema returns a StringAttribute schema for the entity's description.

func (*EntityBase) EntityBaseAttributes added in v1.2.0

func (r *EntityBase) EntityBaseAttributes(entityName string) map[string]schema.Attribute

EntityBaseAttributes returns a map of attributes for a given entity name.

func (*EntityBase) EntityBaseConfigure added in v1.2.0

func (r *EntityBase) EntityBaseConfigure(ctx context.Context, providerData any, diags *diag.Diagnostics)

Configure assigns the provider's client to the entity for API interactions.

func (*EntityBase) GetPortValidators added in v1.2.0

func (r *EntityBase) GetPortValidators() []validator.Int32

GetPortValidators returns an Int32 validator that enforces a valid TCP port range (80–65535)

func (*EntityBase) LightstepTracingSchema added in v1.2.0

func (r *EntityBase) LightstepTracingSchema() schema.ListNestedBlock

LightstepTracingSchema returns the nested block schema for query configuration.

func (*EntityBase) NameSchema added in v1.2.0

func (r *EntityBase) NameSchema(entityName string) schema.StringAttribute

NameSchema returns a StringAttribute schema for the given entity's name, computing or requiring it based on IsNameComputed.

func (*EntityBase) OtelTracingSchema added in v1.2.0

func (r *EntityBase) OtelTracingSchema() schema.ListNestedBlock

OtelTracingSchema returns the nested block schema for query configuration.

func (*EntityBase) QuerySchema added in v1.2.0

func (r *EntityBase) QuerySchema() schema.NestedBlockObject

QuerySchema returns the nested block schema for query configuration.

type EntityBaseModel added in v1.2.0

type EntityBaseModel struct {
	ID          types.String `tfsdk:"id"`
	CplnID      types.String `tfsdk:"cpln_id"`
	Name        types.String `tfsdk:"name"`
	Description types.String `tfsdk:"description"`
	Tags        types.Map    `tfsdk:"tags"`
	SelfLink    types.String `tfsdk:"self_link"`
}

EntityBaseModel holds the shared attributes for Terraform entities.

func (*EntityBaseModel) Fill added in v1.2.0

func (b *EntityBaseModel) Fill(api *client.Base, isUpdate bool)

Fill updates the api client from EntityBaseModel.

func (*EntityBaseModel) From added in v1.2.0

func (b *EntityBaseModel) From(api client.Base)

From updates the state attributes from the api client.

func (EntityBaseModel) GetID added in v1.2.0

func (b EntityBaseModel) GetID() types.String

GetID returns the ID field from the entity base model.

type EntityOperations added in v1.2.0

type EntityOperations[Plan any, APIObject any] struct {
	IdFromPlan  func(plan Plan) string
	NewOperator func(ctx context.Context, diags *diag.Diagnostics, plan Plan) EntityOperatorInterface[Plan, APIObject]
}

EntityOperations bundles the provider-specific callbacks.

func NewEntityOperations added in v1.2.0

func NewEntityOperations[
	Plan HasEntityID, APIObject any, Operator EntityOperatorInterface[Plan, APIObject],
](
	client *client.Client,
	prototype Operator,
) EntityOperations[Plan, APIObject]

NewEntityOperations initializes a new EntityOperations instance.

type EntityOperator added in v1.2.0

type EntityOperator[Plan any] struct {
	Ctx    context.Context
	Diags  *diag.Diagnostics
	Client *client.Client
	Plan   Plan
}

EntityOperator is a generic interface for entity operations.

func (*EntityOperator[Plan]) BuildLoadBalancerIpSet added in v1.2.0

func (eo *EntityOperator[Plan]) BuildLoadBalancerIpSet(state types.String, org string) *string

BuildLoadBalancerIpSet constructs and formats a LoadBalancer IP set path from the Terraform state and organization.

func (*EntityOperator[Plan]) BuildMapString added in v1.2.0

func (eo *EntityOperator[Plan]) BuildMapString(state types.Map) *map[string]interface{}

BuildStringSet constructs a string slice from the given Terraform state.

func (*EntityOperator[Plan]) BuildQuery added in v1.2.0

func (eo *EntityOperator[Plan]) BuildQuery(state types.List) *client.Query

BuildQuery constructs a Query struct from the given Terraform state.

func (*EntityOperator[Plan]) BuildSetInt added in v1.2.0

func (eo *EntityOperator[Plan]) BuildSetInt(state types.Set) *[]int

BuildSetInt constructs a string slice from the given Terraform state.

func (*EntityOperator[Plan]) BuildSetString added in v1.2.0

func (eo *EntityOperator[Plan]) BuildSetString(state types.Set) *[]string

BuildSetString constructs a string slice from the given Terraform state.

func (*EntityOperator[Plan]) BuildTracing added in v1.2.0

func (eo *EntityOperator[Plan]) BuildTracing(lightstepTracingState types.List, otelTracingState types.List, cplnTracingState types.List) *client.Tracing

BuildTracing constructs a client.Tracing from Terraform state.

func (*EntityOperator[Plan]) FlattenLoadBalancerIpSet added in v1.2.0

func (eo *EntityOperator[Plan]) FlattenLoadBalancerIpSet(state types.String, input *string, org string) types.String

FlattenLoadBalancerIpSet normalizes the LoadBalancer IP set string based on existing state and input.

func (*EntityOperator[Plan]) FlattenQuery added in v1.2.0

func (eo *EntityOperator[Plan]) FlattenQuery(input *client.Query) types.List

FlattenQuery transforms client.Query into a Terraform types.List.

func (*EntityOperator[Plan]) FlattenTracing added in v1.2.0

func (eo *EntityOperator[Plan]) FlattenTracing(input *client.Tracing) (types.List, types.List, types.List)

FlattenTracing transforms a client.Tracing object into separate Terraform types.List values for each provider.

func (*EntityOperator[Plan]) FormatIpSetPath added in v1.2.0

func (eo *EntityOperator[Plan]) FormatIpSetPath(ipSetParam string, org string) *string

formatIpSetPath formats the IP Set path based on the provided IP Set value.

func (*EntityOperator[Plan]) Init added in v1.2.0

func (eo *EntityOperator[Plan]) Init(
	ctx context.Context,
	diags *diag.Diagnostics,
	client *client.Client,
	plan Plan,
)

Init initializes the entity operator with context, diagnostics, plan, and client.

type EntityOperatorInterface added in v1.2.0

type EntityOperatorInterface[Plan any, APIObject any] interface {
	Init(ctx context.Context, diags *diag.Diagnostics, client *client.Client, plan Plan)
	NewAPIRequest(isUpdate bool) APIObject
	MapResponseToState(src *APIObject, isCreate bool) Plan
	InvokeCreate(req APIObject) (*APIObject, int, error)
	InvokeRead(name string) (*APIObject, int, error)
	InvokeUpdate(req APIObject) (*APIObject, int, error)
	InvokeDelete(name string) error
}

EntityOperatorInterface is a generic interface for entity operations.

type GroupResource added in v1.2.0

type GroupResource struct {
	EntityBase
	Operations EntityOperations[GroupResourceModel, client.Group]
}

GroupResource is the resource implementation.

func (*GroupResource) Configure added in v1.2.0

Configure configures the resource before use.

func (*GroupResource) Create added in v1.2.0

Create creates the resource.

func (*GroupResource) Delete added in v1.2.0

Delete removes the resource.

func (*GroupResource) ImportState added in v1.2.0

ImportState sets up the import operation to map the imported ID to the "id" attribute in the state.

func (*GroupResource) Metadata added in v1.2.0

Metadata provides the resource type name.

func (*GroupResource) Read added in v1.2.0

Read fetches the current state of the resource.

func (*GroupResource) Schema added in v1.2.0

Schema defines the schema for the resource.

func (*GroupResource) Update added in v1.2.0

Update modifies the resource.

type GroupResourceModel added in v1.2.0

type GroupResourceModel struct {
	EntityBaseModel
	UserIdsAndEmails types.Set    `tfsdk:"user_ids_and_emails"`
	ServiceAccounts  types.Set    `tfsdk:"service_accounts"`
	MemberQuery      types.List   `tfsdk:"member_query"`
	IdentityMatcher  types.List   `tfsdk:"identity_matcher"`
	Origin           types.String `tfsdk:"origin"`
}

GroupResourceModel holds the Terraform state for the resource.

type GroupResourceOperator added in v1.2.0

type GroupResourceOperator struct {
	EntityOperator[GroupResourceModel]
}

GroupResourceOperator is the operator for managing the state.

func (*GroupResourceOperator) InvokeCreate added in v1.2.0

func (gro *GroupResourceOperator) InvokeCreate(req client.Group) (*client.Group, int, error)

InvokeCreate invokes the Create API to create a new resource.

func (*GroupResourceOperator) InvokeDelete added in v1.2.0

func (gro *GroupResourceOperator) InvokeDelete(name string) error

InvokeDelete invokes the Delete API to delete a resource by name.

func (*GroupResourceOperator) InvokeRead added in v1.2.0

func (gro *GroupResourceOperator) InvokeRead(name string) (*client.Group, int, error)

InvokeRead invokes the Get API to retrieve an existing resource by name.

func (*GroupResourceOperator) InvokeUpdate added in v1.2.0

func (gro *GroupResourceOperator) InvokeUpdate(req client.Group) (*client.Group, int, error)

InvokeUpdate invokes the Update API to update an existing resource.

func (*GroupResourceOperator) MapResponseToState added in v1.2.0

func (gro *GroupResourceOperator) MapResponseToState(group *client.Group, isCreate bool) GroupResourceModel

MapResponseToState creates a state model from response payload.

func (*GroupResourceOperator) NewAPIRequest added in v1.2.0

func (gro *GroupResourceOperator) NewAPIRequest(isUpdate bool) client.Group

NewAPIRequest creates a request payload from a state model.

type GvcDataSource added in v1.2.0

type GvcDataSource struct {
	EntityBase
	Operations EntityOperations[GvcResourceModel, client.Gvc]
}

GvcDataSource is the data source implementation.

func (*GvcDataSource) Configure added in v1.2.0

Configure configures the data source before use.

func (*GvcDataSource) Metadata added in v1.2.0

Metadata provides the data source type name.

func (*GvcDataSource) Read added in v1.2.0

Read fetches the current state of the resource.

func (*GvcDataSource) Schema added in v1.2.0

Schema defines the schema for the data source.

type GvcResource added in v1.2.0

type GvcResource struct {
	EntityBase
	Operations EntityOperations[GvcResourceModel, client.Gvc]
}

GvcResource is the resource implementation.

func (*GvcResource) Configure added in v1.2.0

Configure configures the resource before use.

func (*GvcResource) Create added in v1.2.0

Create creates the resource.

func (*GvcResource) Delete added in v1.2.0

Delete removes the resource.

func (*GvcResource) ImportState added in v1.2.0

ImportState sets up the import operation to map the imported ID to the "id" attribute in the state.

func (*GvcResource) Metadata added in v1.2.0

Metadata provides the resource type name.

func (*GvcResource) Read added in v1.2.0

Read fetches the current state of the resource.

func (*GvcResource) RequiresReplace added in v1.2.5

func (gr *GvcResource) RequiresReplace() planmodifier.String

RequiresReplace returns a plan modifier that blocks GVC replacement unless the configuration contains the tag `cpln/terraformReplace = "true"`.

func (*GvcResource) Schema added in v1.2.0

Schema defines the schema for the resource.

func (*GvcResource) Update added in v1.2.0

Update modifies the resource.

type GvcResourceModel added in v1.2.0

type GvcResourceModel struct {
	EntityBaseModel
	Alias                types.String `tfsdk:"alias"`
	Locations            types.Set    `tfsdk:"locations"`
	PullSecrets          types.Set    `tfsdk:"pull_secrets"`
	Domain               types.String `tfsdk:"domain"`
	EndpointNamingFormat types.String `tfsdk:"endpoint_naming_format"`
	Env                  types.Map    `tfsdk:"env"`
	LightstepTracing     types.List   `tfsdk:"lightstep_tracing"`
	OtelTracing          types.List   `tfsdk:"otel_tracing"`
	ControlPlaneTracing  types.List   `tfsdk:"controlplane_tracing"`
	Sidecar              types.List   `tfsdk:"sidecar"`
	LoadBalancer         types.List   `tfsdk:"load_balancer"`
	Keda                 types.List   `tfsdk:"keda"`
}

GvcResourceModel holds the Terraform state for the resource.

type GvcResourceOperator added in v1.2.0

type GvcResourceOperator struct {
	EntityOperator[GvcResourceModel]
}

GvcResourceOperator is the operator for managing the state.

func (*GvcResourceOperator) InvokeCreate added in v1.2.0

func (aro *GvcResourceOperator) InvokeCreate(req client.Gvc) (*client.Gvc, int, error)

InvokeCreate invokes the Create API to create a new resource.

func (*GvcResourceOperator) InvokeDelete added in v1.2.0

func (aro *GvcResourceOperator) InvokeDelete(name string) error

InvokeDelete invokes the Delete API to delete a resource by name.

func (*GvcResourceOperator) InvokeRead added in v1.2.0

func (aro *GvcResourceOperator) InvokeRead(name string) (*client.Gvc, int, error)

InvokeRead invokes the Get API to retrieve an existing resource by name.

func (*GvcResourceOperator) InvokeUpdate added in v1.2.0

func (aro *GvcResourceOperator) InvokeUpdate(req client.Gvc) (*client.Gvc, int, error)

InvokeUpdate invokes the Update API to update an existing resource.

func (*GvcResourceOperator) MapResponseToState added in v1.2.0

func (gro *GvcResourceOperator) MapResponseToState(gvc *client.Gvc, isCreate bool) GvcResourceModel

MapResponseToState creates a state model from response payload.

func (*GvcResourceOperator) NewAPIRequest added in v1.2.0

func (gro *GvcResourceOperator) NewAPIRequest(isUpdate bool) client.Gvc

NewAPIRequest creates a request payload from a state model.

type HasEntityID added in v1.2.0

type HasEntityID interface {
	// GetID returns the entity ID as a types.String.
	GetID() types.String
}

HasEntityID defines an interface for types that provide an entity ID.

type IdentityResource added in v1.2.0

type IdentityResource struct {
	EntityBase
	Operations EntityOperations[IdentityResourceModel, client.Identity]
}

IdentityResource is the resource implementation.

func (*IdentityResource) Configure added in v1.2.0

Configure configures the resource before use.

func (*IdentityResource) Create added in v1.2.0

Create creates the resource.

func (*IdentityResource) Delete added in v1.2.0

Delete removes the resource.

func (*IdentityResource) ImportState added in v1.2.0

ImportState sets up the import operation to map the imported ID to the "id" attribute in the state.

func (*IdentityResource) Metadata added in v1.2.0

Metadata provides the resource type name.

func (*IdentityResource) NgsPermissions added in v1.2.0

func (ir *IdentityResource) NgsPermissions(description string) schema.ListNestedBlock

NgsPermissions creates a nested list block schema using the provided description.

func (*IdentityResource) Read added in v1.2.0

Read fetches the current state of the resource.

func (*IdentityResource) Schema added in v1.2.0

Schema defines the schema for the resource.

func (*IdentityResource) Update added in v1.2.0

Update modifies the resource.

type IdentityResourceModel added in v1.2.0

type IdentityResourceModel struct {
	EntityBaseModel
	Gvc                   types.String `tfsdk:"gvc"`
	Status                types.Map    `tfsdk:"status"`
	AwsAccessPolicy       types.List   `tfsdk:"aws_access_policy"`
	GcpAccessPolicy       types.List   `tfsdk:"gcp_access_policy"`
	AzureAccessPolicy     types.List   `tfsdk:"azure_access_policy"`
	NgsAccessPolicy       types.List   `tfsdk:"ngs_access_policy"`
	NetworkResource       types.Set    `tfsdk:"network_resource"`
	NativeNetworkResource types.Set    `tfsdk:"native_network_resource"`
}

IdentityResourceModel holds the Terraform state for the resource.

type IdentityResourceOperator added in v1.2.0

type IdentityResourceOperator struct {
	EntityOperator[IdentityResourceModel]
}

IdentityResourceOperator is the operator for managing the state.

func (*IdentityResourceOperator) InvokeCreate added in v1.2.0

func (iro *IdentityResourceOperator) InvokeCreate(req client.Identity) (*client.Identity, int, error)

InvokeCreate invokes the Create API to create a new resource.

func (*IdentityResourceOperator) InvokeDelete added in v1.2.0

func (iro *IdentityResourceOperator) InvokeDelete(name string) error

InvokeDelete invokes the Delete API to delete a resource by name.

func (*IdentityResourceOperator) InvokeRead added in v1.2.0

func (iro *IdentityResourceOperator) InvokeRead(name string) (*client.Identity, int, error)

InvokeRead invokes the Get API to retrieve an existing resource by name.

func (*IdentityResourceOperator) InvokeUpdate added in v1.2.0

func (iro *IdentityResourceOperator) InvokeUpdate(req client.Identity) (*client.Identity, int, error)

InvokeUpdate invokes the Update API to update an existing resource.

func (*IdentityResourceOperator) MapResponseToState added in v1.2.0

func (iro *IdentityResourceOperator) MapResponseToState(apiResp *client.Identity, isCreate bool) IdentityResourceModel

MapResponseToState constructs the Terraform state model from the API response payload.

func (*IdentityResourceOperator) NewAPIRequest added in v1.2.0

func (iro *IdentityResourceOperator) NewAPIRequest(isUpdate bool) client.Identity

NewAPIRequest creates a request payload from a state model.

type ImageDataSource added in v1.2.0

type ImageDataSource struct {
	EntityBase
	Operations EntityOperations[ImageDataSourceModel, client.Image]
}

ImageDataSource is the data source implementation.

func (*ImageDataSource) ConfigSchema added in v1.2.0

func (d *ImageDataSource) ConfigSchema(description string) schema.ListNestedAttribute

ConfigSchema returns a ListNestedAttribute schema for the ImagesDataSource using the provided description and nested computed attributes.

func (*ImageDataSource) Configure added in v1.2.0

Configure configures the data source before use.

func (*ImageDataSource) Metadata added in v1.2.0

Metadata provides the data source type name.

func (*ImageDataSource) Read added in v1.2.0

Read fetches the current state of the resource.

func (*ImageDataSource) Schema added in v1.2.0

Schema defines the schema for the data source.

type ImageDataSourceModel added in v1.2.0

type ImageDataSourceModel struct {
	EntityBaseModel
	Tag        types.String `tfsdk:"tag"`
	Repository types.String `tfsdk:"repository"`
	Digest     types.String `tfsdk:"digest"`
	Manifest   types.List   `tfsdk:"manifest"`
}

ImageDataSourceModel holds the Terraform state for the data source.

type ImageDataSourceOperator added in v1.2.0

type ImageDataSourceOperator struct {
	EntityOperator[ImageDataSourceModel]
}

ImageDataSourceOperator is the operator for managing the state.

func (*ImageDataSourceOperator) InvokeCreate added in v1.2.0

func (ieo *ImageDataSourceOperator) InvokeCreate(req client.Image) (*client.Image, int, error)

InvokeCreate invokes the Create API to create a new resource.

func (*ImageDataSourceOperator) InvokeDelete added in v1.2.0

func (ieo *ImageDataSourceOperator) InvokeDelete(name string) error

InvokeDelete invokes the Delete API to delete a resource by name.

func (*ImageDataSourceOperator) InvokeRead added in v1.2.0

func (ieo *ImageDataSourceOperator) InvokeRead(name string) (*client.Image, int, error)

InvokeRead invokes the Get API to retrieve an existing resource by name.

func (*ImageDataSourceOperator) InvokeUpdate added in v1.2.0

func (ieo *ImageDataSourceOperator) InvokeUpdate(req client.Image) (*client.Image, int, error)

InvokeUpdate invokes the Update API to update an existing resource.

func (*ImageDataSourceOperator) MapResponseToState added in v1.2.0

func (ieo *ImageDataSourceOperator) MapResponseToState(image *client.Image, isCreate bool) ImageDataSourceModel

MapResponseToState creates a state model from response payload.

func (*ImageDataSourceOperator) NewAPIRequest added in v1.2.0

func (ieo *ImageDataSourceOperator) NewAPIRequest(isUpdate bool) client.Image

NewAPIRequest creates a request payload from a state model.

type ImagesDataSource added in v1.2.0

type ImagesDataSource struct {
	EntityBase
}

ImagesDataSource is the data source implementation.

func (*ImagesDataSource) ConfigSchema added in v1.2.0

func (d *ImagesDataSource) ConfigSchema(description string) schema.ListNestedAttribute

ConfigSchema returns a ListNestedAttribute schema for the ImagesDataSource using the provided description and nested computed attributes.

func (*ImagesDataSource) Configure added in v1.2.0

Configure configures the data source before use.

func (*ImagesDataSource) Metadata added in v1.2.0

Metadata provides the data source type name.

func (*ImagesDataSource) Read added in v1.2.0

Read fetches the current state of the resource.

func (*ImagesDataSource) Schema added in v1.2.0

Schema defines the schema for the data source.

type ImagesDataSourceModel added in v1.2.0

type ImagesDataSourceModel struct {
	Images types.List `tfsdk:"images"`
	Query  types.List `tfsdk:"query"`
}

ImagesDataSourceModel holds the Terraform state for the data source.

type ImagesDataSourceOperator added in v1.2.0

type ImagesDataSourceOperator struct {
	Ctx    context.Context
	Diags  *diag.Diagnostics
	Client *client.Client
	Plan   ImagesDataSourceModel
}

ImagesDataSourceOperator is the operator for managing the state.

func (*ImagesDataSourceOperator) InvokeRead added in v1.2.0

InvokeRead invokes the Get API to retrieve an existing resource by name.

func (*ImagesDataSourceOperator) MapResponseToState added in v1.2.0

MapResponseToState creates a state model from response payload.

type IpSetResource added in v1.2.0

type IpSetResource struct {
	EntityBase
	Operations EntityOperations[IpSetResourceModel, client.IpSet]
}

IpSetResource is the resource implementation.

func (*IpSetResource) Configure added in v1.2.0

Configure configures the resource before use.

func (*IpSetResource) Create added in v1.2.0

Create creates the resource.

func (*IpSetResource) Delete added in v1.2.0

Delete removes the resource.

func (*IpSetResource) ImportState added in v1.2.0

ImportState sets up the import operation to map the imported ID to the "id" attribute in the state.

func (*IpSetResource) Metadata added in v1.2.0

Metadata provides the resource type name.

func (*IpSetResource) Read added in v1.2.0

Read fetches the current state of the resource.

func (*IpSetResource) Schema added in v1.2.0

Schema defines the schema for the resource.

func (*IpSetResource) Update added in v1.2.0

Update modifies the resource.

type IpSetResourceModel added in v1.2.0

type IpSetResourceModel struct {
	EntityBaseModel
	Link      types.String `tfsdk:"link"`
	Locations types.Set    `tfsdk:"location"`
	Status    types.List   `tfsdk:"status"`
}

IpSetResourceModel holds the Terraform state for the resource.

type IpSetResourceOperator added in v1.2.0

type IpSetResourceOperator struct {
	EntityOperator[IpSetResourceModel]
}

IpSetResourceOperator is the operator for managing the state.

func (*IpSetResourceOperator) InvokeCreate added in v1.2.0

func (isro *IpSetResourceOperator) InvokeCreate(req client.IpSet) (*client.IpSet, int, error)

InvokeCreate invokes the Create API to create a new resource.

func (*IpSetResourceOperator) InvokeDelete added in v1.2.0

func (isro *IpSetResourceOperator) InvokeDelete(name string) error

InvokeDelete invokes the Delete API to delete a resource by name.

func (*IpSetResourceOperator) InvokeRead added in v1.2.0

func (isro *IpSetResourceOperator) InvokeRead(name string) (*client.IpSet, int, error)

InvokeRead invokes the Get API to retrieve an existing resource by name.

func (*IpSetResourceOperator) InvokeUpdate added in v1.2.0

func (isro *IpSetResourceOperator) InvokeUpdate(req client.IpSet) (*client.IpSet, int, error)

InvokeUpdate invokes the Update API to update an existing resource.

func (*IpSetResourceOperator) MapResponseToState added in v1.2.0

func (isro *IpSetResourceOperator) MapResponseToState(apiResp *client.IpSet, isCreate bool) IpSetResourceModel

MapResponseToState constructs the Terraform state model from the API response payload.

func (*IpSetResourceOperator) NewAPIRequest added in v1.2.0

func (isro *IpSetResourceOperator) NewAPIRequest(isUpdate bool) client.IpSet

NewAPIRequest creates a request payload from a state model.

type LocationDataSource added in v1.2.0

type LocationDataSource struct {
	EntityBase
	Operations EntityOperations[LocationResourceModel, client.Location]
}

LocationDataSource is the data source implementation.

func (*LocationDataSource) Configure added in v1.2.0

Configure configures the data source before use.

func (*LocationDataSource) Metadata added in v1.2.0

Metadata provides the data source type name.

func (*LocationDataSource) Read added in v1.2.0

Read fetches the current state of the resource.

func (*LocationDataSource) Schema added in v1.2.0

Schema defines the schema for the data source.

type LocationResource added in v1.2.0

type LocationResource struct {
	EntityBase
	Operations EntityOperations[LocationResourceModel, client.Location]
}

LocationResource is the resource implementation.

func (*LocationResource) Configure added in v1.2.0

Configure configures the resource before use.

func (*LocationResource) Create added in v1.2.0

Create creates the resource.

func (*LocationResource) Delete added in v1.2.0

Delete removes the resource.

func (*LocationResource) ImportState added in v1.2.0

ImportState sets up the import operation to map the imported ID to the "id" attribute in the state.

func (*LocationResource) Metadata added in v1.2.0

Metadata provides the resource type name.

func (*LocationResource) Read added in v1.2.0

Read fetches the current state of the resource.

func (*LocationResource) Schema added in v1.2.0

Schema defines the schema for the resource.

func (*LocationResource) Update added in v1.2.0

Update modifies the resource.

type LocationResourceModel added in v1.2.0

type LocationResourceModel struct {
	EntityBaseModel
	CloudProvider types.String `tfsdk:"cloud_provider"`
	Region        types.String `tfsdk:"region"`
	Enabled       types.Bool   `tfsdk:"enabled"`
	Geo           types.List   `tfsdk:"geo"`
	IpRanges      types.Set    `tfsdk:"ip_ranges"`
}

LocationResourceModel holds the Terraform state for the resource.

type LocationResourceOperator added in v1.2.0

type LocationResourceOperator struct {
	EntityOperator[LocationResourceModel]
}

LocationResourceOperator is the operator for managing the state.

func (*LocationResourceOperator) InvokeCreate added in v1.2.0

func (leo *LocationResourceOperator) InvokeCreate(req client.Location) (*client.Location, int, error)

InvokeCreate invokes the Create API to create a new resource.

func (*LocationResourceOperator) InvokeDelete added in v1.2.0

func (leo *LocationResourceOperator) InvokeDelete(name string) error

InvokeDelete invokes the Delete API to delete a resource by name.

func (*LocationResourceOperator) InvokeRead added in v1.2.0

func (leo *LocationResourceOperator) InvokeRead(name string) (*client.Location, int, error)

InvokeRead invokes the Get API to retrieve an existing resource by name.

func (*LocationResourceOperator) InvokeUpdate added in v1.2.0

func (leo *LocationResourceOperator) InvokeUpdate(req client.Location) (*client.Location, int, error)

InvokeUpdate invokes the Update API to update an existing resource.

func (*LocationResourceOperator) MapResponseToState added in v1.2.0

func (leo *LocationResourceOperator) MapResponseToState(apiResp *client.Location, isCreate bool) LocationResourceModel

MapResponseToState constructs the Terraform state model from the API response payload.

func (*LocationResourceOperator) NewAPIRequest added in v1.2.0

func (leo *LocationResourceOperator) NewAPIRequest(isUpdate bool) client.Location

NewAPIRequest creates a request payload from a state model.

type LocationsDataSource added in v1.2.0

type LocationsDataSource struct {
	EntityBase
}

LocationsDataSource is the data source implementation.

func (*LocationsDataSource) Configure added in v1.2.0

Configure configures the data source before use.

func (*LocationsDataSource) Metadata added in v1.2.0

Metadata provides the data source type name.

func (*LocationsDataSource) Read added in v1.2.0

Read fetches the current state of the resource.

func (*LocationsDataSource) Schema added in v1.2.0

Schema defines the schema for the data source.

type LocationsDataSourceModel added in v1.2.0

type LocationsDataSourceModel struct {
	Locations types.List `tfsdk:"locations"`
}

LocationsDataSourceModel holds the Terraform state for the data source.

type LocationsDataSourceOperator added in v1.2.0

type LocationsDataSourceOperator struct {
	Ctx    context.Context
	Diags  *diag.Diagnostics
	Client *client.Client
	Plan   LocationsDataSourceModel
}

LocationsDataSourceOperator is the operator for managing the state.

func (*LocationsDataSourceOperator) InvokeRead added in v1.2.0

func (leo *LocationsDataSourceOperator) InvokeRead() (*client.Locations, error)

InvokeRead invokes the Get API to retrieve an existing resource by name.

func (*LocationsDataSourceOperator) MapResponseToState added in v1.2.0

func (leo *LocationsDataSourceOperator) MapResponseToState(locations *client.Locations) LocationsDataSourceModel

MapResponseToState creates a state model from response payload.

type Mk8sKubeconfigResource added in v1.2.0

type Mk8sKubeconfigResource struct {
	EntityBase
}

Mk8sKubeconfigResource is the resource implementation.

func (*Mk8sKubeconfigResource) ConfigValidators added in v1.2.0

func (mkr *Mk8sKubeconfigResource) ConfigValidators(ctx context.Context) []resource.ConfigValidator

ConfigValidators enforces mutual exclusivity between attributes.

func (*Mk8sKubeconfigResource) Configure added in v1.2.0

Configure configures the resource before use.

func (*Mk8sKubeconfigResource) Create added in v1.2.0

Create creates the resource.

func (*Mk8sKubeconfigResource) Delete added in v1.2.0

Delete removes the resource.

func (*Mk8sKubeconfigResource) Metadata added in v1.2.0

Metadata provides the resource type name.

func (*Mk8sKubeconfigResource) Read added in v1.2.0

Read fetches the current state of the resource.

func (*Mk8sKubeconfigResource) Schema added in v1.2.0

Schema defines the schema for the resource.

func (*Mk8sKubeconfigResource) Update added in v1.2.0

Update modifies the resource.

type Mk8sKubeconfigResourceModel added in v1.2.0

type Mk8sKubeconfigResourceModel struct {
	ID             types.String `tfsdk:"id"`
	Name           types.String `tfsdk:"name"`
	Profile        types.String `tfsdk:"profile"`
	ServiceAccount types.String `tfsdk:"service_account"`
	Kubeconfig     types.String `tfsdk:"kubeconfig"`
}

Mk8sKubeconfigResourceModel holds the Terraform state for the resource.

type Mk8sResource added in v1.2.0

type Mk8sResource struct {
	EntityBase
	Operations EntityOperations[Mk8sResourceModel, client.Mk8s]
}

Mk8sResource is the resource implementation.

func (*Mk8sResource) AutoscalerSchema added in v1.2.0

func (mr *Mk8sResource) AutoscalerSchema() schema.ListNestedBlock

AutoscalerSchema returns the schema for the cluster autoscaler nested block.

func (*Mk8sResource) AwsAddOnStatusSchema added in v1.2.0

func (mr *Mk8sResource) AwsAddOnStatusSchema() schema.ListNestedAttribute

AwsAddOnStatusSchema returns the schema for the AWS add-on status nested attribute.

func (*Mk8sResource) AwsAmiSchema added in v1.2.0

func (mr *Mk8sResource) AwsAmiSchema() schema.ListNestedBlock

AwsAmiSchema returns the schema for the AWS AMI nested block.

func (*Mk8sResource) AzureImageSchema added in v1.2.0

func (mr *Mk8sResource) AzureImageSchema(description string) schema.ListNestedBlock

AzureImageSchema returns a ListNestedBlock describing Azure VM image configuration with either a recommended image or a specific reference.

func (*Mk8sResource) ConfigValidators added in v1.2.0

func (mr *Mk8sResource) ConfigValidators(ctx context.Context) []resource.ConfigValidator

ConfigValidators enforces mutual exclusivity between attributes.

func (*Mk8sResource) Configure added in v1.2.0

Configure configures the resource before use.

func (*Mk8sResource) Create added in v1.2.0

Create creates the resource.

func (*Mk8sResource) Delete added in v1.2.0

Delete removes the resource.

func (*Mk8sResource) GenericNodePoolLabelsSchema added in v1.2.0

func (mr *Mk8sResource) GenericNodePoolLabelsSchema() schema.MapAttribute

GenericNodePoolLabelsSchema returns the schema for the generic node pool labels attribute.

func (*Mk8sResource) GenericNodePoolMaxSizeSchema added in v1.2.0

func (mr *Mk8sResource) GenericNodePoolMaxSizeSchema() schema.Int32Attribute

GenericNodePoolMaxSizeSchema returns the schema for the generic node pool maximum size attribute.

func (*Mk8sResource) GenericNodePoolMinSizeSchema added in v1.2.0

func (mr *Mk8sResource) GenericNodePoolMinSizeSchema() schema.Int32Attribute

GenericNodePoolMinSizeSchema returns the schema for the generic node pool minimum size attribute.

func (*Mk8sResource) GenericNodePoolNameSchema added in v1.2.0

func (mr *Mk8sResource) GenericNodePoolNameSchema() schema.StringAttribute

GenericNodePoolNameSchema returns the schema for the generic node pool name attribute.

func (*Mk8sResource) GenericNodePoolSchema added in v1.2.0

func (mr *Mk8sResource) GenericNodePoolSchema(description string) schema.SetNestedBlock

GenericNodePoolSchema returns the schema for a generic node pool nested block.

func (*Mk8sResource) GenericNodePoolTaintsSchema added in v1.2.0

func (mr *Mk8sResource) GenericNodePoolTaintsSchema() schema.SetNestedBlock

GenericNodePoolTaintsSchema returns the schema for the generic node pool taints nested block.

func (*Mk8sResource) HasRoleArnSchema added in v1.2.0

func (mr *Mk8sResource) HasRoleArnSchema(description string) schema.ListNestedBlock

HasRoleArnSchema returns the schema for the nested block that specifies a role ARN.

func (*Mk8sResource) ImportState added in v1.2.0

ImportState sets up the import operation to map the imported ID to the "id" attribute in the state.

func (*Mk8sResource) Metadata added in v1.2.0

Metadata provides the resource type name.

func (*Mk8sResource) NetworkingSchema added in v1.2.0

func (mr *Mk8sResource) NetworkingSchema() schema.ListNestedBlock

NetworkingSchema returns the schema for the networking nested block.

func (*Mk8sResource) ObjectUnknownStatusSchema added in v1.2.0

func (mr *Mk8sResource) ObjectUnknownStatusSchema() schema.StringAttribute

ObjectUnknownStatusSchema returns the schema for an object’s unknown status attribute.

func (*Mk8sResource) PreInstallScriptSchema added in v1.2.0

func (mr *Mk8sResource) PreInstallScriptSchema() schema.StringAttribute

PreInstallScriptSchema returns the schema for the pre-installation script attribute.

func (*Mk8sResource) Read added in v1.2.0

Read fetches the current state of the resource.

func (*Mk8sResource) Schema added in v1.2.0

Schema defines the schema for the resource.

func (*Mk8sResource) Update added in v1.2.0

Update modifies the resource.

type Mk8sResourceModel added in v1.2.0

type Mk8sResourceModel struct {
	EntityBaseModel
	Alias                types.String `tfsdk:"alias"`
	Version              types.String `tfsdk:"version"`
	Firewall             types.Set    `tfsdk:"firewall"`
	GenericProvider      types.List   `tfsdk:"generic_provider"`
	HetznerProvider      types.List   `tfsdk:"hetzner_provider"`
	AwsProvider          types.List   `tfsdk:"aws_provider"`
	LinodeProvider       types.List   `tfsdk:"linode_provider"`
	OblivusProvider      types.List   `tfsdk:"oblivus_provider"`
	LambdalabsProvider   types.List   `tfsdk:"lambdalabs_provider"`
	PaperspaceProvider   types.List   `tfsdk:"paperspace_provider"`
	EphemeralProvider    types.List   `tfsdk:"ephemeral_provider"`
	TritonProvider       types.List   `tfsdk:"triton_provider"`
	AzureProvider        types.List   `tfsdk:"azure_provider"`
	DigitalOceanProvider types.List   `tfsdk:"digital_ocean_provider"`
	AddOns               types.List   `tfsdk:"add_ons"`
	Status               types.List   `tfsdk:"status"`
}

Mk8sResourceModel holds the Terraform state for the resource.

type Mk8sResourceOperator added in v1.2.0

type Mk8sResourceOperator struct {
	EntityOperator[Mk8sResourceModel]
}

Mk8sResourceOperator is the operator for managing the state.

func (*Mk8sResourceOperator) InvokeCreate added in v1.2.0

func (mro *Mk8sResourceOperator) InvokeCreate(req client.Mk8s) (*client.Mk8s, int, error)

InvokeCreate invokes the Create API to create a new resource.

func (*Mk8sResourceOperator) InvokeDelete added in v1.2.0

func (mro *Mk8sResourceOperator) InvokeDelete(name string) error

InvokeDelete invokes the Delete API to delete a resource by name.

func (*Mk8sResourceOperator) InvokeRead added in v1.2.0

func (mro *Mk8sResourceOperator) InvokeRead(name string) (*client.Mk8s, int, error)

InvokeRead invokes the Get API to retrieve an existing resource by name.

func (*Mk8sResourceOperator) InvokeUpdate added in v1.2.0

func (mro *Mk8sResourceOperator) InvokeUpdate(req client.Mk8s) (*client.Mk8s, int, error)

InvokeUpdate invokes the Update API to update an existing resource.

func (*Mk8sResourceOperator) MapResponseToState added in v1.2.0

func (mro *Mk8sResourceOperator) MapResponseToState(apiResp *client.Mk8s, isCreate bool) Mk8sResourceModel

MapResponseToState constructs the Terraform state model from the API response payload.

func (*Mk8sResourceOperator) NewAPIRequest added in v1.2.0

func (mro *Mk8sResourceOperator) NewAPIRequest(isUpdate bool) client.Mk8s

NewAPIRequest creates a request payload from a state model.

type OrgDataSource added in v1.2.0

type OrgDataSource struct {
	EntityBase
	Operations EntityOperations[OrgResourceModel, client.Org]
}

OrgDataSource is the data source implementation.

func (*OrgDataSource) Configure added in v1.2.0

Configure configures the data source before use.

func (*OrgDataSource) Metadata added in v1.2.0

Metadata provides the data source type name.

func (*OrgDataSource) Read added in v1.2.0

Read fetches the current state of the resource.

func (*OrgDataSource) Schema added in v1.2.0

Schema defines the schema for the data source.

type OrgLoggingResource added in v1.2.0

type OrgLoggingResource struct {
	EntityBase
}

OrgLoggingResource is the resource implementation.

func (*OrgLoggingResource) Configure added in v1.2.0

Configure configures the resource before use.

func (*OrgLoggingResource) Create added in v1.2.0

Create creates the resource.

func (*OrgLoggingResource) Delete added in v1.2.0

Delete removes the resource.

func (*OrgLoggingResource) ImportState added in v1.2.0

ImportState sets up the import operation to map the imported ID to the "id" attribute in the state.

func (*OrgLoggingResource) Metadata added in v1.2.0

Metadata provides the resource type name.

func (*OrgLoggingResource) Read added in v1.2.0

Read fetches the current state of the resource.

func (*OrgLoggingResource) Schema added in v1.2.0

Schema defines the schema for the resource.

func (*OrgLoggingResource) Update added in v1.2.0

Update modifies the resource.

type OrgLoggingResourceModel added in v1.2.0

type OrgLoggingResourceModel struct {
	ID                 types.String `tfsdk:"id"`
	CplnID             types.String `tfsdk:"cpln_id"`
	Name               types.String `tfsdk:"name"`
	Description        types.String `tfsdk:"description"`
	Tags               types.Map    `tfsdk:"tags"`
	SelfLink           types.String `tfsdk:"self_link"`
	S3Logging          types.Set    `tfsdk:"s3_logging"`
	CoralogixLogging   types.Set    `tfsdk:"coralogix_logging"`
	DatadogLogging     types.Set    `tfsdk:"datadog_logging"`
	LogzioLogging      types.Set    `tfsdk:"logzio_logging"`
	ElasticLogging     types.Set    `tfsdk:"elastic_logging"`
	CloudWatchLogging  types.Set    `tfsdk:"cloud_watch_logging"`
	FluentdLogging     types.Set    `tfsdk:"fluentd_logging"`
	StackdriverLogging types.Set    `tfsdk:"stackdriver_logging"`
	SyslogLogging      types.Set    `tfsdk:"syslog_logging"`
}

OrgLoggingResourceModel holds the Terraform state for the resource.

type OrgResource added in v1.2.0

type OrgResource struct {
	EntityBase
	Operations EntityOperations[OrgResourceModel, client.Org]
}

OrgResource is the resource implementation.

func (*OrgResource) Configure added in v1.2.0

Configure configures the resource before use.

func (*OrgResource) Create added in v1.2.0

Create creates the resource.

func (*OrgResource) Delete added in v1.2.0

Delete removes the resource.

func (*OrgResource) ImportState added in v1.2.0

ImportState sets up the import operation to map the imported ID to the "id" attribute in the state.

func (*OrgResource) Metadata added in v1.2.0

Metadata provides the resource type name.

func (*OrgResource) ModifyPlan added in v1.2.0

ModifyPlan modifies the plan for the resource.

func (*OrgResource) Read added in v1.2.0

Read fetches the current state of the resource.

func (*OrgResource) Schema added in v1.2.0

Schema defines the schema for the resource.

func (*OrgResource) Update added in v1.2.0

Update modifies the resource.

type OrgResourceModel added in v1.2.0

type OrgResourceModel struct {
	EntityBaseModel
	AccountId             types.String `tfsdk:"account_id"`
	Invitees              types.Set    `tfsdk:"invitees"`
	SessionTimeoutSeconds types.Int32  `tfsdk:"session_timeout_seconds"`
	AuthConfig            types.List   `tfsdk:"auth_config"`
	Observability         types.List   `tfsdk:"observability"`
	Security              types.List   `tfsdk:"security"`
	Status                types.List   `tfsdk:"status"`
}

OrgResourceModel holds the Terraform state for the resource.

type OrgResourceOperator added in v1.2.0

type OrgResourceOperator struct {
	EntityOperator[OrgResourceModel]
}

OrgResourceOperator is the operator for managing the state.

func (*OrgResourceOperator) InvokeCreate added in v1.2.0

func (oro *OrgResourceOperator) InvokeCreate(req client.Org) (*client.Org, int, error)

InvokeCreate invokes the Create API to create a new resource.

func (*OrgResourceOperator) InvokeDelete added in v1.2.0

func (oro *OrgResourceOperator) InvokeDelete(name string) error

InvokeDelete invokes the Delete API to delete a resource by name.

func (*OrgResourceOperator) InvokeRead added in v1.2.0

func (oro *OrgResourceOperator) InvokeRead(name string) (*client.Org, int, error)

InvokeRead invokes the Get API to retrieve an existing resource by name.

func (*OrgResourceOperator) InvokeUpdate added in v1.2.0

func (oro *OrgResourceOperator) InvokeUpdate(req client.Org) (*client.Org, int, error)

InvokeUpdate invokes the Update API to update an existing resource.

func (*OrgResourceOperator) MapResponseToState added in v1.2.0

func (oro *OrgResourceOperator) MapResponseToState(apiResp *client.Org, isCreate bool) OrgResourceModel

MapResponseToState constructs the Terraform state model from the API response payload.

func (*OrgResourceOperator) NewAPIRequest added in v1.2.0

func (oro *OrgResourceOperator) NewAPIRequest(isUpdate bool) client.Org

NewAPIRequest creates a request payload from a state model.

type OrgTracingResource added in v1.2.0

type OrgTracingResource struct {
	EntityBase
}

OrgTracingResource is the resource implementation.

func (*OrgTracingResource) ConfigValidators added in v1.2.0

func (otr *OrgTracingResource) ConfigValidators(ctx context.Context) []resource.ConfigValidator

ConfigValidators enforces mutual exclusivity between attributes.

func (*OrgTracingResource) Configure added in v1.2.0

Configure configures the resource before use.

func (*OrgTracingResource) Create added in v1.2.0

Create creates the resource.

func (*OrgTracingResource) Delete added in v1.2.0

Delete removes the resource.

func (*OrgTracingResource) ImportState added in v1.2.0

ImportState sets up the import operation to map the imported ID to the "id" attribute in the state.

func (*OrgTracingResource) Metadata added in v1.2.0

Metadata provides the resource type name.

func (*OrgTracingResource) Read added in v1.2.0

Read fetches the current state of the resource.

func (*OrgTracingResource) Schema added in v1.2.0

Schema defines the schema for the resource.

func (*OrgTracingResource) Update added in v1.2.0

Update modifies the resource.

type OrgTracingResourceModel added in v1.2.0

type OrgTracingResourceModel struct {
	ID                  types.String `tfsdk:"id"`
	CplnID              types.String `tfsdk:"cpln_id"`
	Name                types.String `tfsdk:"name"`
	Description         types.String `tfsdk:"description"`
	Tags                types.Map    `tfsdk:"tags"`
	SelfLink            types.String `tfsdk:"self_link"`
	LightstepTracing    types.List   `tfsdk:"lightstep_tracing"`
	OtelTracing         types.List   `tfsdk:"otel_tracing"`
	ControlPlaneTracing types.List   `tfsdk:"controlplane_tracing"`
}

OrgTracingResourceModel holds the Terraform state for the resource.

type PolicyResource added in v1.2.0

type PolicyResource struct {
	EntityBase
	Operations EntityOperations[PolicyResourceModel, client.Policy]
}

PolicyResource is the resource implementation.

func (*PolicyResource) ConfigValidators added in v1.2.0

func (pr *PolicyResource) ConfigValidators(ctx context.Context) []resource.ConfigValidator

ConfigValidators enforces mutual exclusivity between attributes.

func (*PolicyResource) Configure added in v1.2.0

Configure configures the resource before use.

func (*PolicyResource) Create added in v1.2.0

Create creates the resource.

func (*PolicyResource) Delete added in v1.2.0

Delete removes the resource.

func (*PolicyResource) ImportState added in v1.2.0

ImportState sets up the import operation to map the imported ID to the "id" attribute in the state.

func (*PolicyResource) Metadata added in v1.2.0

Metadata provides the resource type name.

func (*PolicyResource) Read added in v1.2.0

Read fetches the current state of the resource.

func (*PolicyResource) RequiresReplaceOnRemoval added in v1.2.0

func (pr *PolicyResource) RequiresReplaceOnRemoval() planmodifier.Set

RequiresReplaceOnRemoval returns a plan modifier that forces a replace if the prior state was non-empty and the new plan is null/empty.

func (*PolicyResource) Schema added in v1.2.0

Schema defines the schema for the resource.

func (*PolicyResource) Update added in v1.2.0

Update modifies the resource.

type PolicyResourceModel added in v1.2.0

type PolicyResourceModel struct {
	EntityBaseModel
	TargetKind  types.String `tfsdk:"target_kind"`
	Gvc         types.String `tfsdk:"gvc"`
	TargetLinks types.Set    `tfsdk:"target_links"`
	TargetQuery types.List   `tfsdk:"target_query"`
	Target      types.String `tfsdk:"target"`
	Origin      types.String `tfsdk:"origin"`
	Binding     types.Set    `tfsdk:"binding"`
}

PolicyResourceModel holds the Terraform state for the resource.

type PolicyResourceOperator added in v1.2.0

type PolicyResourceOperator struct {
	EntityOperator[PolicyResourceModel]
}

PolicyResourceOperator is the operator for managing the state.

func (*PolicyResourceOperator) InvokeCreate added in v1.2.0

func (pro *PolicyResourceOperator) InvokeCreate(req client.Policy) (*client.Policy, int, error)

InvokeCreate invokes the Create API to create a new resource.

func (*PolicyResourceOperator) InvokeDelete added in v1.2.0

func (pro *PolicyResourceOperator) InvokeDelete(name string) error

InvokeDelete invokes the Delete API to delete a resource by name.

func (*PolicyResourceOperator) InvokeRead added in v1.2.0

func (pro *PolicyResourceOperator) InvokeRead(name string) (*client.Policy, int, error)

InvokeRead invokes the Get API to retrieve an existing resource by name.

func (*PolicyResourceOperator) InvokeUpdate added in v1.2.0

func (pro *PolicyResourceOperator) InvokeUpdate(req client.Policy) (*client.Policy, int, error)

InvokeUpdate invokes the Update API to update an existing resource.

func (*PolicyResourceOperator) MapResponseToState added in v1.2.0

func (pro *PolicyResourceOperator) MapResponseToState(apiResp *client.Policy, isCreate bool) PolicyResourceModel

MapResponseToState constructs the Terraform state model from the API response payload.

func (*PolicyResourceOperator) NewAPIRequest added in v1.2.0

func (pro *PolicyResourceOperator) NewAPIRequest(isUpdate bool) client.Policy

NewAPIRequest creates a request payload from a state model.

type SecretDataSource added in v1.2.0

type SecretDataSource struct {
	EntityBase
	Operations EntityOperations[SecretResourceModel, client.Secret]
}

SecretDataSource is the data source implementation.

func (*SecretDataSource) Configure added in v1.2.0

Configure configures the data source before use.

func (*SecretDataSource) Metadata added in v1.2.0

Metadata provides the data source type name.

func (*SecretDataSource) Read added in v1.2.0

Read fetches the current state of the resource.

func (*SecretDataSource) Schema added in v1.2.0

Schema defines the schema for the data source.

type SecretResource added in v1.2.0

type SecretResource struct {
	EntityBase
	Operations EntityOperations[SecretResourceModel, client.Secret]
}

SecretResource is the resource implementation.

func (*SecretResource) ConfigValidators added in v1.2.0

func (mr *SecretResource) ConfigValidators(ctx context.Context) []resource.ConfigValidator

ConfigValidators enforces mutual exclusivity between attributes.

func (*SecretResource) Configure added in v1.2.0

Configure configures the resource before use.

func (*SecretResource) Create added in v1.2.0

Create creates the resource.

func (*SecretResource) Delete added in v1.2.0

Delete removes the resource.

func (*SecretResource) ImportState added in v1.2.0

ImportState sets up the import operation to map the imported ID to the "id" attribute in the state.

func (*SecretResource) Metadata added in v1.2.0

Metadata provides the resource type name.

func (*SecretResource) Read added in v1.2.0

Read fetches the current state of the resource.

func (*SecretResource) Schema added in v1.2.0

Schema defines the schema for the resource.

func (*SecretResource) Update added in v1.2.0

Update modifies the resource.

type SecretResourceModel added in v1.2.0

type SecretResourceModel struct {
	EntityBaseModel
	Opaque           []models.OpaqueModel         `tfsdk:"opaque"`
	TLS              []models.TlsModel            `tfsdk:"tls"`
	GCP              types.String                 `tfsdk:"gcp"`
	AWS              []models.AwsModel            `tfsdk:"aws"`
	ECR              []models.EcrModel            `tfsdk:"ecr"`
	Docker           types.String                 `tfsdk:"docker"`
	UsernamePassword []models.UserpassModel       `tfsdk:"userpass"`
	KeyPair          []models.KeyPairModel        `tfsdk:"keypair"`
	Dictionary       types.Map                    `tfsdk:"dictionary"`
	DictionaryAsEnvs types.Map                    `tfsdk:"dictionary_as_envs"`
	AzureSdk         types.String                 `tfsdk:"azure_sdk"`
	AzureConnector   []models.AzureConnectorModel `tfsdk:"azure_connector"`
	NatsAccount      []models.NatsAccountModel    `tfsdk:"nats_account"`
	SecretLink       types.String                 `tfsdk:"secret_link"`
}

SecretResourceModel holds the Terraform state for the resource.

type SecretResourceOperator added in v1.2.0

type SecretResourceOperator struct {
	EntityOperator[SecretResourceModel]
	DataBuilders map[string]func(SecretResourceModel) *interface{}
}

SecretResourceOperator is the operator for managing the state.

func NewSecretResourceOperator added in v1.2.0

func NewSecretResourceOperator() *SecretResourceOperator

NewSecretResourceOperator initializes the operator with per-type data builders.

func (*SecretResourceOperator) InvokeCreate added in v1.2.0

func (sro *SecretResourceOperator) InvokeCreate(req client.Secret) (*client.Secret, int, error)

InvokeCreate invokes the Create API to create a new resource.

func (*SecretResourceOperator) InvokeDelete added in v1.2.0

func (sro *SecretResourceOperator) InvokeDelete(name string) error

InvokeDelete invokes the Delete API to delete a resource by name.

func (*SecretResourceOperator) InvokeRead added in v1.2.0

func (sro *SecretResourceOperator) InvokeRead(name string) (*client.Secret, int, error)

InvokeRead invokes the Get API to retrieve an existing resource by name.

func (*SecretResourceOperator) InvokeUpdate added in v1.2.0

func (sro *SecretResourceOperator) InvokeUpdate(req client.Secret) (*client.Secret, int, error)

InvokeUpdate invokes the Update API to update an existing resource.

func (*SecretResourceOperator) MapResponseToState added in v1.2.0

func (sro *SecretResourceOperator) MapResponseToState(apiResp *client.Secret, isCreate bool) SecretResourceModel

MapResponseToState constructs the Terraform state model from the API response payload.

func (*SecretResourceOperator) NewAPIRequest added in v1.2.0

func (sro *SecretResourceOperator) NewAPIRequest(isUpdate bool) client.Secret

NewAPIRequest creates a request payload from a state model.

type ServiceAccountKeyResource added in v1.2.0

type ServiceAccountKeyResource struct {
	EntityBase
}

ServiceAccountKeyResource is the resource implementation.

func (*ServiceAccountKeyResource) Configure added in v1.2.0

Configure configures the resource before use.

func (*ServiceAccountKeyResource) Create added in v1.2.0

Create creates the resource.

func (*ServiceAccountKeyResource) Delete added in v1.2.0

Delete removes the resource.

func (*ServiceAccountKeyResource) ImportState added in v1.2.0

ImportState sets up the import operation.

func (*ServiceAccountKeyResource) Metadata added in v1.2.0

Metadata provides the resource type name.

func (*ServiceAccountKeyResource) Read added in v1.2.0

Read fetches the current state of the resource.

func (*ServiceAccountKeyResource) Schema added in v1.2.0

Schema defines the schema for the resource.

func (*ServiceAccountKeyResource) Update added in v1.2.0

Update modifies the resource.

type ServiceAccountKeyResourceModel added in v1.2.0

type ServiceAccountKeyResourceModel struct {
	ServiceAccountName types.String `tfsdk:"service_account_name"`
	Description        types.String `tfsdk:"description"`
	Name               types.String `tfsdk:"name"`
	Created            types.String `tfsdk:"created"`
	Key                types.String `tfsdk:"key"`
}

ServiceAccountKeyResourceModel holds the Terraform state for the resource.

type ServiceAccountResource added in v1.2.0

type ServiceAccountResource struct {
	EntityBase
	Operations EntityOperations[ServiceAccountResourceModel, client.ServiceAccount]
}

ServiceAccountResource is the resource implementation.

func (*ServiceAccountResource) Configure added in v1.2.0

Configure configures the resource before use.

func (*ServiceAccountResource) Create added in v1.2.0

Create creates the resource.

func (*ServiceAccountResource) Delete added in v1.2.0

Delete removes the resource.

func (*ServiceAccountResource) ImportState added in v1.2.0

ImportState sets up the import operation to map the imported ID to the "id" attribute in the state.

func (*ServiceAccountResource) Metadata added in v1.2.0

Metadata provides the resource type name.

func (*ServiceAccountResource) Read added in v1.2.0

Read fetches the current state of the resource.

func (*ServiceAccountResource) Schema added in v1.2.0

Schema defines the schema for the resource.

func (*ServiceAccountResource) Update added in v1.2.0

Update modifies the resource.

type ServiceAccountResourceModel added in v1.2.0

type ServiceAccountResourceModel struct {
	EntityBaseModel
	Origin types.String `tfsdk:"origin"`
}

ServiceAccountResourceModel holds the Terraform state for the resource.

type ServiceAccountResourceOperator added in v1.2.0

type ServiceAccountResourceOperator struct {
	EntityOperator[ServiceAccountResourceModel]
}

ServiceAccountResourceOperator is the operator for managing the state.

func (*ServiceAccountResourceOperator) InvokeCreate added in v1.2.0

InvokeCreate invokes the Create API to create a new resource.

func (*ServiceAccountResourceOperator) InvokeDelete added in v1.2.0

func (saro *ServiceAccountResourceOperator) InvokeDelete(name string) error

InvokeDelete invokes the Delete API to delete a resource by name.

func (*ServiceAccountResourceOperator) InvokeRead added in v1.2.0

InvokeRead invokes the Get API to retrieve an existing resource by name.

func (*ServiceAccountResourceOperator) InvokeUpdate added in v1.2.0

InvokeUpdate invokes the Update API to update an existing resource.

func (*ServiceAccountResourceOperator) MapResponseToState added in v1.2.0

func (saro *ServiceAccountResourceOperator) MapResponseToState(apiResp *client.ServiceAccount, isCreate bool) ServiceAccountResourceModel

MapResponseToState constructs the Terraform state model from the API response payload.

func (*ServiceAccountResourceOperator) NewAPIRequest added in v1.2.0

func (saro *ServiceAccountResourceOperator) NewAPIRequest(isUpdate bool) client.ServiceAccount

NewAPIRequest creates a request payload from a state model.

type VolumeSetResource added in v1.2.0

type VolumeSetResource struct {
	EntityBase
	Operations EntityOperations[VolumeSetResourceModel, client.VolumeSet]
}

VolumeSetResource is the resource implementation.

func (*VolumeSetResource) Configure added in v1.2.0

Configure configures the resource before use.

func (*VolumeSetResource) Create added in v1.2.0

Create creates the resource.

func (*VolumeSetResource) Delete added in v1.2.0

Delete removes the resource.

func (*VolumeSetResource) ImportState added in v1.2.0

ImportState sets up the import operation to map the imported ID to the "id" attribute in the state.

func (*VolumeSetResource) Metadata added in v1.2.0

Metadata provides the resource type name.

func (*VolumeSetResource) Read added in v1.2.0

Read fetches the current state of the resource.

func (*VolumeSetResource) Schema added in v1.2.0

Schema defines the schema for the resource.

func (*VolumeSetResource) Update added in v1.2.0

Update modifies the resource.

func (*VolumeSetResource) ValidateConfig added in v1.2.0

ValidateConfig validates the configuration of the resource.

type VolumeSetResourceModel added in v1.2.0

type VolumeSetResourceModel struct {
	EntityBaseModel
	Gvc                types.String               `tfsdk:"gvc"`
	Status             types.List                 `tfsdk:"status"`
	InitialCapacity    types.Int32                `tfsdk:"initial_capacity"`
	PerformanceClass   types.String               `tfsdk:"performance_class"`
	StorageClassSuffix types.String               `tfsdk:"storage_class_suffix"`
	FileSystemType     types.String               `tfsdk:"file_system_type"`
	Snapshots          []models.SnapshotsModel    `tfsdk:"snapshots"`
	Autoscaling        []models.AutoscalingModel  `tfsdk:"autoscaling"`
	MountOptions       []models.MountOptionsModel `tfsdk:"mount_options"`
	VolumesetLink      types.String               `tfsdk:"volumeset_link"`
}

VolumeSetResourceModel holds the Terraform state for the resource.

type VolumeSetResourceOperator added in v1.2.0

type VolumeSetResourceOperator struct {
	EntityOperator[VolumeSetResourceModel]
}

VolumeSetResourceOperator is the operator for managing the state.

func (*VolumeSetResourceOperator) InvokeCreate added in v1.2.0

func (vsro *VolumeSetResourceOperator) InvokeCreate(req client.VolumeSet) (*client.VolumeSet, int, error)

InvokeCreate invokes the Create API to create a new resource.

func (*VolumeSetResourceOperator) InvokeDelete added in v1.2.0

func (vsro *VolumeSetResourceOperator) InvokeDelete(name string) error

InvokeDelete invokes the Delete API to delete a resource by name.

func (*VolumeSetResourceOperator) InvokeRead added in v1.2.0

func (vsro *VolumeSetResourceOperator) InvokeRead(name string) (*client.VolumeSet, int, error)

InvokeRead invokes the Get API to retrieve an existing resource by name.

func (*VolumeSetResourceOperator) InvokeUpdate added in v1.2.0

func (vsro *VolumeSetResourceOperator) InvokeUpdate(req client.VolumeSet) (*client.VolumeSet, int, error)

InvokeUpdate invokes the Update API to update an existing resource.

func (*VolumeSetResourceOperator) MapResponseToState added in v1.2.0

func (vsro *VolumeSetResourceOperator) MapResponseToState(apiResp *client.VolumeSet, isCreate bool) VolumeSetResourceModel

MapResponseToState constructs the Terraform state model from the API response payload.

func (*VolumeSetResourceOperator) NewAPIRequest added in v1.2.0

func (vsro *VolumeSetResourceOperator) NewAPIRequest(isUpdate bool) client.VolumeSet

NewAPIRequest creates a request payload from a state model.

type WorkloadResource added in v1.2.0

type WorkloadResource struct {
	EntityBase
	Operations EntityOperations[WorkloadResourceModel, client.Workload]
}

WorkloadResource is the resource implementation.

func (*WorkloadResource) Configure added in v1.2.0

Configure configures the resource before use.

func (*WorkloadResource) Create added in v1.2.0

Create creates the resource.

func (*WorkloadResource) Delete added in v1.2.0

Delete removes the resource.

func (*WorkloadResource) ExecSchema added in v1.2.0

func (wr *WorkloadResource) ExecSchema(description string) schema.ListNestedBlock

ExecSchema returns a nested block list schema for configuring exec-based probes.

func (*WorkloadResource) GetCpuMemoryValidators added in v1.2.0

func (wr *WorkloadResource) GetCpuMemoryValidators(regexMessage string) []validator.String

GetCpuMemoryValidators returns a list of validators to ensure CPU/memory values follow proper format and size limits.

func (*WorkloadResource) HealthCheckSchema added in v1.2.0

func (wr *WorkloadResource) HealthCheckSchema(attributeName string, description string) schema.ListNestedBlock

HealthCheckSchema returns a nested block list schema for configuring workload health checks.

func (*WorkloadResource) ImportState added in v1.2.0

ImportState sets up the import operation to map the imported ID to the "id" attribute in the state.

func (*WorkloadResource) LifecycleSpecSchema added in v1.2.0

func (wr *WorkloadResource) LifecycleSpecSchema(commandDescription string) schema.ListNestedBlock

LifecycleSpecSchema returns a nested block list schema for workload lifecycle specifications.

func (*WorkloadResource) LocalOptionsSchema added in v1.2.0

func (wr *WorkloadResource) LocalOptionsSchema() schema.ListNestedBlock

LocalOptionsSchema returns a nested block list schema for overriding default options per specific Control Plane location.

func (*WorkloadResource) Metadata added in v1.2.0

Metadata provides the resource type name.

func (*WorkloadResource) ModifyAutoscaling added in v1.2.0

func (wr *WorkloadResource) ModifyAutoscaling(ctx context.Context, diags *diag.Diagnostics, autoscaling *models.OptionsAutoscalingModel)

ModifyAutoscaling sets default values for metric and target if autoscaling is single-target and values are not provided.

func (*WorkloadResource) ModifyContainers added in v1.2.0

func (wr *WorkloadResource) ModifyContainers(ctx context.Context, diags *diag.Diagnostics, container *models.ContainerModel)

ModifyContainers updates container health checks using the first available port if port is not explicitly set.

func (*WorkloadResource) ModifyHealthCheck added in v1.2.0

func (wr *WorkloadResource) ModifyHealthCheck(ctx context.Context, diags *diag.Diagnostics, healthCheck *models.ContainerHealthCheckModel, port *int)

ModifyHealthCheck sets a default port for the HTTP health check if not explicitly defined.

func (*WorkloadResource) ModifyPlan added in v1.2.0

ModifyPlan modifies the plan for the resource.

func (*WorkloadResource) NameRequiresReplace added in v1.2.5

func (wr *WorkloadResource) NameRequiresReplace() planmodifier.String

NameRequiresReplace forces replace on workload name change and warns about downtime.

func (*WorkloadResource) OptionsSchema added in v1.2.0

func (wr *WorkloadResource) OptionsSchema(description string) schema.ListNestedBlock

OptionsSchema returns a nested block list schema for workload options such as AI capacity, debug mode, and auto-scaling.

func (*WorkloadResource) Read added in v1.2.0

Read fetches the current state of the resource.

func (*WorkloadResource) Schema added in v1.2.0

Schema defines the schema for the resource.

func (*WorkloadResource) Update added in v1.2.0

Update modifies the resource.

func (*WorkloadResource) ValidateConfig added in v1.2.0

ValidateConfig validates the configuration of the resource.

type WorkloadResourceModel added in v1.2.0

type WorkloadResourceModel struct {
	EntityBaseModel
	Gvc                types.String `tfsdk:"gvc"`
	Type               types.String `tfsdk:"type"`
	IdentityLink       types.String `tfsdk:"identity_link"`
	Containers         types.List   `tfsdk:"container"`
	Firewall           types.List   `tfsdk:"firewall_spec"`
	Options            types.List   `tfsdk:"options"`
	LocalOptions       types.List   `tfsdk:"local_options"`
	Job                types.List   `tfsdk:"job"`
	Sidecar            types.List   `tfsdk:"sidecar"`
	SupportDynamicTags types.Bool   `tfsdk:"support_dynamic_tags"`
	RolloutOptions     types.List   `tfsdk:"rollout_options"`
	SecurityOptions    types.List   `tfsdk:"security_options"`
	LoadBalancer       types.List   `tfsdk:"load_balancer"`
	Extras             types.String `tfsdk:"extras"`
	RequestRetryPolicy types.List   `tfsdk:"request_retry_policy"`
	Status             types.List   `tfsdk:"status"`
}

WorkloadResourceModel holds the Terraform state for the resource.

type WorkloadResourceOperator added in v1.2.0

type WorkloadResourceOperator struct {
	EntityOperator[WorkloadResourceModel]
}

WorkloadResourceOperator is the operator for managing the state.

func (*WorkloadResourceOperator) InvokeCreate added in v1.2.0

func (wro *WorkloadResourceOperator) InvokeCreate(req client.Workload) (*client.Workload, int, error)

InvokeCreate invokes the Create API to create a new resource.

func (*WorkloadResourceOperator) InvokeDelete added in v1.2.0

func (wro *WorkloadResourceOperator) InvokeDelete(name string) error

InvokeDelete invokes the Delete API to delete a resource by name.

func (*WorkloadResourceOperator) InvokeRead added in v1.2.0

func (wro *WorkloadResourceOperator) InvokeRead(name string) (*client.Workload, int, error)

InvokeRead invokes the Get API to retrieve an existing resource by name.

func (*WorkloadResourceOperator) InvokeUpdate added in v1.2.0

func (wro *WorkloadResourceOperator) InvokeUpdate(req client.Workload) (*client.Workload, int, error)

InvokeUpdate invokes the Update API to update an existing resource.

func (*WorkloadResourceOperator) MapResponseToState added in v1.2.0

func (wro *WorkloadResourceOperator) MapResponseToState(apiResp *client.Workload, isCreate bool) WorkloadResourceModel

MapResponseToState constructs the Terraform state model from the API response payload.

func (*WorkloadResourceOperator) NewAPIRequest added in v1.2.0

func (wro *WorkloadResourceOperator) NewAPIRequest(isUpdate bool) client.Workload

NewAPIRequest creates a request payload from a state model.

type WorkloadResourceValidator added in v1.2.0

type WorkloadResourceValidator struct {
	Ctx   context.Context
	Diags *diag.Diagnostics
	Plan  WorkloadResourceModel
}

WorkloadResourceValidator is used to validate the resource configuration.

func (*WorkloadResourceValidator) Validate added in v1.2.0

func (wrv *WorkloadResourceValidator) Validate()

Validate validates the workload resource plan against defined constraints.

Jump to

Keyboard shortcuts

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