diff --git a/variables.tf b/variables.tf index 47ed838..b1dc74d 100644 --- a/variables.tf +++ b/variables.tf @@ -116,6 +116,11 @@ variable "availability_zone_count" { type = number default = 2 description = "Number of Availability Zones for the domain to use." + + validation { + condition = contains([2, 3], var.availability_zone_count) + error_message = "The availibility zone count must be 2 or 3." + } } variable "ebs_volume_size" { @@ -357,4 +362,4 @@ variable "custom_endpoint_certificate_arn" { type = string description = "ACM certificate ARN for custom endpoint." default = "" -} \ No newline at end of file +}