DEPRECATED: Starting with Terraform 1.2, you can acomplish more complex validation using preconditions.
Terraform provides a way to add validation to variables, but you can't use other variables in this validation. This allows you to do complex validation on variables or resource outputs.
This provider has a single validation data source.
terraform {
required_providers {
validation = {
source = "articulate/validation"
}
}
}
data "validation" "foo" {
condition = var.foo != "" || var.bar != ""
error_message = "You must set foo or bar."
}
To build for the current system, run make build
. If you want to build for all
systems, run make all
.
If you wish to work on the provider, you'll first need Go installed on your machine (see Requirements above).
To compile the provider, run make build
.
Run the full suite of Acceptance tests, run make testacc
.