Last active
October 6, 2022 20:52
-
-
Save guillermo-musumeci/64b66487e192852c3f63a1c0b1191322 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 upper case" | |
| validation { | |
| condition = upper(var.app_name) == var.app_name | |
| error_message = "Application name value must be in all upper case" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment