Use this module to verify values from resources during plan. This module has no outputs and does not create any resources. It uses terraform interpolation to check values and bash script to exit with error when they do not pass the verification.
If you need to verify just module variables - use terraform built-in validation rules
For more real life examples check ./examples directory
module "check" {
source = "gordonbondon/verify/common"
version = "~> 1.0"
match = contains(tolist(["a", "b", "c"]), "a")
error = "Value must be one of a,b,c"
}
bash
shell interpreter
Name | Version |
---|---|
terraform | >= 1.0 |
external | >= 1.1.0 |
Name | Version |
---|---|
external | 2.3.3 |
No modules.
Name | Type |
---|---|
external_external.validate | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
error | error message to display | string |
n/a | yes |
match | pass in expression that will evaluate to true or false |
bool |
n/a | yes |
No outputs.