From 3125d5a76a4c3a7021aec48459086de6aac35b01 Mon Sep 17 00:00:00 2001 From: Jacob Hudson Date: Wed, 19 Apr 2023 12:44:07 -0500 Subject: [PATCH 1/2] removing validating blocking single-AZ ES clusters --- variables.tf | 5 ----- 1 file changed, 5 deletions(-) diff --git a/variables.tf b/variables.tf index 4830134..8ef9c24 100644 --- a/variables.tf +++ b/variables.tf @@ -122,11 +122,6 @@ 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" { From 0d93d905938fa630f04f5f000724971d6c6521d3 Mon Sep 17 00:00:00 2001 From: Jacob Hudson Date: Wed, 19 Apr 2023 16:13:38 -0500 Subject: [PATCH 2/2] set validation on the condition of Zone Awareness --- variables.tf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/variables.tf b/variables.tf index 8ef9c24..59b021e 100644 --- a/variables.tf +++ b/variables.tf @@ -122,6 +122,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) && var.zone_awareness_enabled == "true" + error_message = "The availibility zone count must be 2 or 3 when Zone Awareness is Enabled." + } } variable "ebs_volume_size" {