github.com/rstandt/terraform@v0.12.32-0.20230710220336-b1063613405c/terraform/testdata/validate-variable-custom-validations-child/child/child.tf (about)

     1  # This feature is currently experimental.
     2  # (If you're currently cleaning up after concluding the experiment,
     3  # remember to also clean up similar references in the configs package
     4  # under "invalid-files" and "invalid-modules".)
     5  terraform {
     6    experiments = [variable_validation]
     7  }
     8  
     9  variable "test" {
    10    type = string
    11  
    12    validation {
    13      condition     = var.test != "nope"
    14      error_message = "Value must not be \"nope\"."
    15    }
    16  }