diff --git a/modules/eks-cluster/README.md b/modules/eks-cluster/README.md
index d3a746e3..24c62f0d 100644
--- a/modules/eks-cluster/README.md
+++ b/modules/eks-cluster/README.md
@@ -51,8 +51,8 @@ module "eks_cluster" {
|------|-------------|------|---------|:--------:|
| [access\_entries](#input\_access\_entries) | Map of access entries to add to the cluster. | `any` | `{}` | no |
| [authentication\_mode](#input\_authentication\_mode) | The authentication mode for the cluster. | `string` | `"API"` | no |
-| [availability\_zones](#input\_availability\_zones) | A list of availability zones names in the region. This value should never be updated after resource creation, please create a new resource instead | `list(string)` | `null` | no |
-| [availability\_zones\_count](#input\_availability\_zones\_count) | The count of availability zones to utilize within the specified AWS Region, where pairs of public and private subnets will be generated. Valid only when availability\_zones variable is not provided. | `number` | `3` | no |
+| [availability\_zones](#input\_availability\_zones) | A list of availability zone names in the region. By default, this is set to `null` and is not used; instead, `availability_zones_count` manages the number of availability zones. This value should not be updated directly. To make changes, please create a new resource. | `list(string)` | `null` | no |
+| [availability\_zones\_count](#input\_availability\_zones\_count) | The count of availability zones to utilize within the specified AWS Region, where pairs of public and private subnets will be generated (minimum is `2`). Valid only when availability\_zones variable is not provided. | `number` | `3` | no |
| [cluster\_node\_ipv4\_cidr](#input\_cluster\_node\_ipv4\_cidr) | The CIDR block for public and private subnets of loadbalancers and nodes. Between /28 and /16. | `string` | `"10.192.0.0/16"` | no |
| [cluster\_service\_ipv4\_cidr](#input\_cluster\_service\_ipv4\_cidr) | The CIDR block to assign Kubernetes service IP addresses from. Between /24 and /12. | `string` | `"10.190.0.0/16"` | no |
| [cluster\_tags](#input\_cluster\_tags) | A map of additional tags to add to the cluster | `map(string)` | `{}` | no |
diff --git a/modules/eks-cluster/variables.tf b/modules/eks-cluster/variables.tf
index 20afda30..56434e69 100644
--- a/modules/eks-cluster/variables.tf
+++ b/modules/eks-cluster/variables.tf
@@ -108,12 +108,12 @@ variable "create_ebs_gp3_default_storage_class" {
variable "availability_zones_count" {
type = number
- description = "The count of availability zones to utilize within the specified AWS Region, where pairs of public and private subnets will be generated. Valid only when availability_zones variable is not provided."
+ description = "The count of availability zones to utilize within the specified AWS Region, where pairs of public and private subnets will be generated (minimum is `2`). Valid only when availability_zones variable is not provided."
default = 3
}
variable "availability_zones" {
type = list(string)
- description = "A list of availability zones names in the region. This value should never be updated after resource creation, please create a new resource instead"
+ description = "A list of availability zone names in the region. By default, this is set to `null` and is not used; instead, `availability_zones_count` manages the number of availability zones. This value should not be updated directly. To make changes, please create a new resource."
default = null
}
diff --git a/test/src/custom_eks_opensearch_test.go b/test/src/custom_eks_opensearch_test.go
index e24f7abd..715c1d8c 100644
--- a/test/src/custom_eks_opensearch_test.go
+++ b/test/src/custom_eks_opensearch_test.go
@@ -85,8 +85,8 @@ func (suite *CustomEKSOpenSearchTestSuite) TestCustomEKSAndOpenSearch() {
"name": suite.clusterName,
"region": suite.region,
"np_desired_node_count": suite.expectedNodes,
- // we test the usage of a single zone
- "availability_zones_count": 1,
+ // we test the usage of a two zones (minimum)
+ "availability_zones_count": 2,
}
suite.sugaredLogger.Infow("Creating EKS cluster...", "extraVars", suite.varTf)
@@ -128,7 +128,7 @@ func (suite *CustomEKSOpenSearchTestSuite) TestCustomEKSAndOpenSearch() {
// idempotency test
terraform.InitAndApply(suite.T(), terraformOptions)
- expectedVpcAZs := fmt.Sprintf("[%sa]", suite.varTf["region"]) // must match availability_zones_count, by default it's the first zone
+ expectedVpcAZs := fmt.Sprintf("[%sa %sb]", suite.varTf["region"], suite.varTf["region"]) // must match availability_zones_count
suite.Assert().Equal(expectedVpcAZs, terraform.Output(suite.T(), terraformOptions, "vpc_azs"))
sess, err := utils.GetAwsClient()