Created
October 6, 2022 20:53
-
-
Save guillermo-musumeci/4b73b43f642f11a371af2117fadc781e 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 "app_name" { | |
| type = string | |
| description = "Application name in lower case" | |
| validation { | |
| condition = lower(var.app_name) == var.app_name | |
| error_message = "Application name value must be in all lower case" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment