QuestionQ20

VerifiedTerraform configuration

Your Terraform configuration declares a variable. You want to ensure its value satisfies your specific requirements and prevent the Terraform operation if it does not.

What should you add to the configuration?

Explanation

A validation block nested in a variable block defines a condition the input value must satisfy. If that condition evaluates to false, Terraform reports the configured error and stops the operation. HashiCorp Terraform variable block reference

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!