Last active
October 6, 2022 17:42
-
-
Save guillermo-musumeci/da64dd43629411fff46bec0fbdf4146a to your computer and use it in GitHub Desktop.
Variable Validation in Terraform
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variable "company_shortname" { | |
description = "The company name" | |
type = string | |
validation { | |
condition = (length(var.company_shortname) > 3) | |
error_message = "The company must be over 3 characters in length" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment