Created
October 6, 2022 09:57
-
-
Save guillermo-musumeci/84275662345828f20fbf67182add6a0b 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
## Service Plan Variable | |
variable "service_plan_sku_name" { | |
type = string | |
description = "The SKU for the plan. Possible values include EP1, EP2 and EP3." | |
validation { | |
condition = contains(["EP1", "EP2", "EP3"], var.service_plan_sku_name) | |
error_message = "Valid values for the service_plan_sku_name variable are EP1, EP2, EP3" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment