terraform/configs/testdata/warning-files
Martin Atkins ff4ea042c2 config: Allow module authors to specify validation rules for variables
The existing "type" argument allows specifying a type constraint that
allows for some basic validation, but often there are more constraints on
a variable value than just its type.

This new feature (requiring an experiment opt-in for now, while we refine
it) allows specifying arbitrary validation rules for any variable which
can then cause custom error messages to be returned when a caller provides
an inappropriate value.

    variable "example" {
      validation {
        condition = var.example != "nope"
        error_message = "Example value must not be \"nope\"."
      }
    }

The core parts of this are designed to do as little new work as possible
when no validations are specified, and thus the main new checking codepath
here can therefore only run when the experiment is enabled in order to
permit having validations.
2020-01-10 15:23:25 -08:00
..
depends_on.tf configs: Emit warnings for deprecated quoted references/keywords 2019-11-11 10:17:34 -08:00
destroy-provisioners.tf deprecation warning for destroy provisioner refs 2019-12-04 11:14:37 -05:00
ignore_changes.tf configs: Emit warnings for deprecated quoted references/keywords 2019-11-11 10:17:34 -08:00
provider_ref.tf configs: Emit warnings for deprecated quoted references/keywords 2019-11-11 10:17:34 -08:00
provisioner_keyword.tf configs: Emit warnings for deprecated quoted references/keywords 2019-11-11 10:17:34 -08:00
redundant_interp.tf configs: Warn for deprecated interpolation and quoted type constraints 2019-11-13 07:55:55 -08:00
variable_type_quoted.tf configs: Warn for deprecated interpolation and quoted type constraints 2019-11-13 07:55:55 -08:00
variable_validation_experiment.tf config: Allow module authors to specify validation rules for variables 2020-01-10 15:23:25 -08:00