Documentation ¶
Index ¶
- Variables
- func All(validators ...schema.SchemaValidateDiagFunc) schema.SchemaValidateDiagFunc
- func CheckImportState(resourceId string, idAttribute string) func(states []*terraform.InstanceState) error
- func Cron(value interface{}, _ cty.Path) diag.Diagnostics
- func CronLength(value interface{}, _ cty.Path) diag.Diagnostics
- func IntAtLeast(min int) schema.SchemaValidateDiagFunc
- func IsEmail(address interface{}, _ cty.Path) diag.Diagnostics
- func LdapDn(value interface{}, _ cty.Path) diag.Diagnostics
- func LdapFilter(value interface{}, _ cty.Path) diag.Diagnostics
- func LowerCase(value interface{}, key cty.Path) diag.Diagnostics
- func StringInSlice(ignoreCase bool, valid ...string) schema.SchemaValidateDiagFunc
- func StringIsNotEmpty(i interface{}, p cty.Path) diag.Diagnostics
- func StringIsNotURL(value interface{}, p cty.Path) diag.Diagnostics
Constants ¶
This section is empty.
Variables ¶
var CommaSeperatedList = validation.ToDiagFunc( validation.StringMatch(regexp.MustCompile(`.+(?:,.+)*`), "must be comma separated string"), )
var LicenseType = validation.ToDiagFunc(validation.StringInSlice(validLicenseTypes, false))
var ProjectKey = validation.ToDiagFunc( validation.StringMatch(regexp.MustCompile(`^[a-z][a-z0-9\-]{1,31}$`), "project_key must be 2 - 32 lowercase alphanumeric and hyphen characters"), )
var RepoKey = validation.AllDiag( validation.ToDiagFunc( validation.StringLenBetween(1, 64), ), validation.ToDiagFunc( validation.StringDoesNotContainAny(" !@#$%^&*()+={}[]:;<>,/?~`|\\"), ), )
Functions ¶
func All ¶
func All(validators ...schema.SchemaValidateDiagFunc) schema.SchemaValidateDiagFunc
All Updated version of the Terraform's original validation func: https://github.com/hashicorp/terraform-plugin-sdk/blob/main/helper/validation/meta.go#L32
All returns a SchemaValidateFunc which tests if the provided value passes all provided SchemaValidateFunc
func CheckImportState ¶ added in v1.10.0
func CheckImportState(resourceId string, idAttribute string) func(states []*terraform.InstanceState) error
CheckImportState is used in ImportStateCheck if ImportState is set to `true`. IdAttribute is the field used in d.SetId() in Create function to set a resource ID.
func CronLength ¶ added in v1.9.0
func CronLength(value interface{}, _ cty.Path) diag.Diagnostics
func IntAtLeast ¶ added in v0.3.0
func IntAtLeast(min int) schema.SchemaValidateDiagFunc
IntAtLeast Updated version of the Terraform's original validation func: https://github.com/hashicorp/terraform-plugin-sdk/blob/5adf5f1c4bf0aee7bb31d51cd7f016e81a39e3e5/helper/validation/int.go#L31
IntAtLeast returns a SchemaValidateFunc which tests if the provided value is of type int and is at least min (inclusive)
func LdapFilter ¶
func LdapFilter(value interface{}, _ cty.Path) diag.Diagnostics
func StringInSlice ¶ added in v0.3.0
func StringInSlice(ignoreCase bool, valid ...string) schema.SchemaValidateDiagFunc
Updated version of the Terraform's original validation func: https://github.com/hashicorp/terraform-plugin-sdk/blob/5adf5f1c4bf0aee7bb31d51cd7f016e81a39e3e5/helper/validation/strings.go#L132
StringInSlice returns a SchemaValidateFunc which tests if the provided value is of type string and matches the value of an element in the valid slice will test with in lower case if ignoreCase is true
func StringIsNotEmpty ¶
func StringIsNotEmpty(i interface{}, p cty.Path) diag.Diagnostics
StringIsNotEmpty Updated version of the Terraform's original validation func: https://github.com/hashicorp/terraform-plugin-sdk/blob/main/helper/validation/strings.go#L14
func StringIsNotURL ¶ added in v0.6.0
func StringIsNotURL(value interface{}, p cty.Path) diag.Diagnostics
Types ¶
This section is empty.