functions

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewARNFunction added in v0.7.0

func NewARNFunction() function.Function

func NewAWSRegionFunction added in v0.8.0

func NewAWSRegionFunction() function.Function

NewAWSRegionFunction returns a Terraform function that validates AWS region codes.

func NewAllValidFunction added in v0.1.2

func NewAllValidFunction() function.Function

func NewAnyValidFunction added in v0.1.2

func NewAnyValidFunction() function.Function

func NewAssertFunction

func NewAssertFunction() function.Function

NewAssertFunction returns a new instance of the assert function.

func NewAzureLocationFunction added in v0.8.0

func NewAzureLocationFunction() function.Function

NewAzureLocationFunction returns a Terraform function that validates Azure location codes.

func NewBase32Function added in v0.2.0

func NewBase32Function() function.Function

NewBase32Function exposes the base32 validator as a Terraform function.

func NewBase64Function

func NewBase64Function() function.Function

NewBase64Function exposes the base64 validator as a Terraform function.

func NewBetweenFunction added in v0.1.6

func NewBetweenFunction() function.Function

func NewCIDRFunction added in v0.1.4

func NewCIDRFunction() function.Function

NewCIDRFunction exposes the CIDR validator as a Terraform function.

func NewCIDROverlapFunction added in v0.3.0

func NewCIDROverlapFunction() function.Function

NewCIDROverlapFunction exposes the CIDR overlap validator.

func NewCreditCardExpiryFunction added in v0.11.2

func NewCreditCardExpiryFunction() function.Function

NewCreditCardExpiryFunction exposes the credit card expiry validator as a Terraform function.

func NewCreditCardFunction

func NewCreditCardFunction() function.Function

NewCreditCardFunction exposes the credit card validator as a Terraform function.

func NewDateTimeFunction added in v0.1.6

func NewDateTimeFunction() function.Function

NewDateTimeFunction exposes the datetime validator as a Terraform function.

func NewDependentValueFunction added in v0.11.0

func NewDependentValueFunction() function.Function

NewDependentValueFunction exposes the dependent_value validator as a Terraform function.

func NewDomainFunction

func NewDomainFunction() function.Function

NewDomainFunction exposes the domain validator as a Terraform function.

func NewEmailFunction

func NewEmailFunction() function.Function

NewEmailFunction exposes the email validator as a Terraform function.

func NewExactlyOneValidFunction added in v0.1.7

func NewExactlyOneValidFunction() function.Function

func NewFQDNFunction added in v0.2.1

func NewFQDNFunction() function.Function

func NewGCPRegionFunction added in v0.8.0

func NewGCPRegionFunction() function.Function

NewGCPRegionFunction returns a Terraform function that validates GCP region codes.

func NewGCPZoneFunction added in v0.9.0

func NewGCPZoneFunction() function.Function

NewGCPZoneFunction returns a Terraform function that validates GCP zone codes.

func NewHexFunction added in v0.2.0

func NewHexFunction() function.Function

func NewHostnameFunction added in v0.1.5

func NewHostnameFunction() function.Function

NewHostnameFunction exposes the hostname validator as a Terraform function.

func NewIPFunction added in v0.1.1

func NewIPFunction() function.Function

NewIPFunction exposes the IP validator as a Terraform function.

func NewIPRangeSizeFunction added in v0.7.0

func NewIPRangeSizeFunction() function.Function

NewIPRangeSizeFunction exposes the ip_range_size validator as a Terraform function.

func NewInListFunction added in v0.1.6

func NewInListFunction() function.Function

NewInListFunction exposes the in_list validator as a Terraform function.

func NewIntegerFunction added in v0.2.0

func NewIntegerFunction() function.Function

NewIntegerFunction exposes the integer validator as a Terraform function.

func NewJSONFunction added in v0.1.1

func NewJSONFunction() function.Function

NewJSONFunction exposes the JSON validator as a Terraform function.

func NewJWTFunction added in v0.2.2

func NewJWTFunction() function.Function

func NewK8sAnnotationValueFunction added in v0.11.2

func NewK8sAnnotationValueFunction() function.Function

func NewK8sLabelKeyFunction added in v0.11.2

func NewK8sLabelKeyFunction() function.Function

func NewK8sLabelValueFunction added in v0.11.2

func NewK8sLabelValueFunction() function.Function

func NewListLengthBetweenFunction added in v0.11.0

func NewListLengthBetweenFunction() function.Function

NewListLengthBetweenFunction exposes the list_length_between validator as a Terraform function.

func NewListSubsetFunction added in v0.6.0

func NewListSubsetFunction() function.Function

func NewListUniqueFunction added in v0.11.0

func NewListUniqueFunction() function.Function

NewListUniqueFunction exposes the list_unique validator as a Terraform function.

func NewMACAddressFunction added in v0.1.5

func NewMACAddressFunction() function.Function

NewMACAddressFunction exposes the MAC address validator as a Terraform function.

func NewMIMETypeFunction added in v0.9.0

func NewMIMETypeFunction() function.Function

NewMIMETypeFunction exposes the MIME type validator as a Terraform function.

func NewMapKeysMatchFunction added in v0.10.0

func NewMapKeysMatchFunction() function.Function

NewMapKeysMatchFunction exposes the map keys matching helper as a Terraform function.

func NewMatchesRegexFunction added in v0.1.2

func NewMatchesRegexFunction() function.Function

NewMatchesRegexFunction exposes a regex matching validator.

func NewMutuallyExclusiveFunction added in v0.10.0

func NewMutuallyExclusiveFunction() function.Function

NewMutuallyExclusiveFunction exposes the mutually exclusive validator as a Terraform function.

func NewNonEmptyListFunction added in v0.10.0

func NewNonEmptyListFunction() function.Function

NewNonEmptyListFunction exposes the non-empty list validator as a Terraform function.

func NewNonNegativeNumberFunction added in v0.10.0

func NewNonNegativeNumberFunction() function.Function

NewNonNegativeNumberFunction exposes the non_negative_number validator as a Terraform function.

func NewNotInListFunction added in v0.1.8

func NewNotInListFunction() function.Function

NewNotInListFunction exposes the not_in_list validator as a Terraform function.

func NewPasswordStrengthFunction added in v0.2.1

func NewPasswordStrengthFunction() function.Function

func NewPhoneFunction added in v0.1.2

func NewPhoneFunction() function.Function

NewPhoneFunction exposes the phone validator as a Terraform function.

func NewPortNumberFunction added in v0.6.0

func NewPortNumberFunction() function.Function

NewPortNumberFunction exposes the port number validator as a Terraform function.

func NewPortRangeFunction added in v0.4.0

func NewPortRangeFunction() function.Function

NewPortRangeFunction exposes the port range validator as a Terraform function.

func NewPositiveNumberFunction added in v0.10.0

func NewPositiveNumberFunction() function.Function

NewPositiveNumberFunction exposes the positive_number validator as a Terraform function.

func NewPrivateIPFunction added in v0.5.0

func NewPrivateIPFunction() function.Function

NewPrivateIPFunction exposes the private IP validator as a Terraform function.

func NewPublicIPFunction added in v0.6.0

func NewPublicIPFunction() function.Function

NewPublicIPFunction exposes the public IP validator as a Terraform function with options. Signature: public_ip(value, exclude_link_local, exclude_reserved)

func NewResourceNameFunction added in v0.11.0

func NewResourceNameFunction() function.Function

NewResourceNameFunction exposes the resource name validator as a Terraform function.

func NewSSHPublicKeyFunction added in v0.2.0

func NewSSHPublicKeyFunction() function.Function

NewSSHPublicKeyFunction exposes the ssh_public_key validator as a Terraform function.

func NewSemVerFunction added in v0.1.1

func NewSemVerFunction() function.Function

NewSemVerFunction exposes the semver validator as a Terraform function.

func NewSemVerRangeFunction added in v0.3.0

func NewSemVerRangeFunction() function.Function

func NewSetEqualsFunction added in v0.1.8

func NewSetEqualsFunction() function.Function

NewSetEqualsFunction exposes the set equivalence helper as a Terraform function.

func NewSizeBetweenFunction added in v0.10.0

func NewSizeBetweenFunction() function.Function

NewSizeBetweenFunction exposes the size_between validator as a Terraform function.

func NewSlugFunction added in v0.9.0

func NewSlugFunction() function.Function

NewSlugFunction exposes the slug validator as a Terraform function.

func NewStringContainsFunction added in v0.1.7

func NewStringContainsFunction() function.Function

NewStringContainsFunction exposes the string_contains validator as a Terraform function.

func NewStringLengthFunction added in v0.1.4

func NewStringLengthFunction() function.Function

NewStringLengthFunction exposes the string length validator as a Terraform function.

func NewStringPrefixFunction added in v0.1.8

func NewStringPrefixFunction() function.Function

NewStringPrefixFunction exposes the string prefix validator as a Terraform function.

func NewStringSuffixFunction added in v0.1.7

func NewStringSuffixFunction() function.Function

NewStringSuffixFunction exposes the string suffix validator as a Terraform function.

func NewSubnetFunction added in v0.6.0

func NewSubnetFunction() function.Function

NewSubnetFunction exposes the subnet validator as a Terraform function.

func NewURIFunction added in v0.5.0

func NewURIFunction() function.Function

NewURIFunction exposes the URI validator as a Terraform function.

func NewURLFunction added in v0.1.3

func NewURLFunction() function.Function

NewURLFunction exposes the URL validator as a Terraform function.

func NewUUIDFunction

func NewUUIDFunction() function.Function

NewUUIDFunction exposes the UUID validator as a Terraform function.

func NewUUIDv4OnlyFunction added in v0.9.0

func NewUUIDv4OnlyFunction() function.Function

NewUUIDv4OnlyFunction exposes the UUIDv4Only validator as a Terraform function.

func NewUsernameFunction added in v0.1.8

func NewUsernameFunction() function.Function

NewUsernameFunction exposes the username validator as a Terraform function.

func NewVersionFunction added in v0.1.3

func NewVersionFunction() function.Function

NewVersionFunction exposes the provider version as a Terraform function.

func ProviderFunctionFactories added in v0.1.1

func ProviderFunctionFactories() []func() function.Function

ProviderFunctionFactories returns all Terraform function constructors exposed by the provider.

func ProviderVersion added in v0.1.3

func ProviderVersion() basetypes.StringValue

ProviderVersion returns the current provider version value.

func SetProviderConfiguration added in v0.2.0

func SetProviderConfiguration(c ProviderConfiguration)

SetProviderConfiguration updates provider-level defaults.

func SetProviderVersion added in v0.1.3

func SetProviderVersion(version string)

SetProviderVersion updates the version string used by provider diagnostic functions.

When the provider is built without an explicit version, Terraform sets the version string to an empty value. Normalize that case to "dev" so the function remains useful during local development.

func UpdateReadmeFunctionsTable added in v0.1.1

func UpdateReadmeFunctionsTable(ctx context.Context, readmePath string) error

UpdateReadmeFunctionsTable rewrites the Available Functions table in README.md based on current function docs.

Types

type FunctionDoc added in v0.1.1

type FunctionDoc struct {
	Name        string
	Summary     string
	Description string
}

FunctionDoc captures high level documentation details for a Terraform function.

func AvailableFunctionDocs added in v0.1.1

func AvailableFunctionDocs(ctx context.Context) ([]FunctionDoc, error)

AvailableFunctionDocs returns documentation metadata for every exported Terraform function.

type K8sAnnotationValueFunction added in v0.11.2

type K8sAnnotationValueFunction struct{}

K8sAnnotationValueFunction validates Kubernetes annotation values.

func (*K8sAnnotationValueFunction) Definition added in v0.11.2

func (*K8sAnnotationValueFunction) Metadata added in v0.11.2

func (*K8sAnnotationValueFunction) Run added in v0.11.2

type K8sLabelKeyFunction added in v0.11.2

type K8sLabelKeyFunction struct{}

K8sLabelKeyFunction validates Kubernetes label keys.

func (*K8sLabelKeyFunction) Definition added in v0.11.2

func (*K8sLabelKeyFunction) Metadata added in v0.11.2

func (*K8sLabelKeyFunction) Run added in v0.11.2

type K8sLabelValueFunction added in v0.11.2

type K8sLabelValueFunction struct{}

K8sLabelValueFunction validates Kubernetes label values.

func (*K8sLabelValueFunction) Definition added in v0.11.2

func (*K8sLabelValueFunction) Metadata added in v0.11.2

func (*K8sLabelValueFunction) Run added in v0.11.2

type ProviderConfiguration added in v0.2.0

type ProviderConfiguration struct {
	DatetimeLayouts []string
}

ProviderConfiguration holds provider-level defaults used by function wrappers.

func GetProviderConfiguration added in v0.2.0

func GetProviderConfiguration() ProviderConfiguration

GetProviderConfiguration returns a snapshot of provider-level defaults.

Jump to

Keyboard shortcuts

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