From 210395257ceaef10c93cfe34374d1cbf5264a2ad Mon Sep 17 00:00:00 2001 From: Jay Patel <78554593+jarpat@users.noreply.github.com> Date: Tue, 24 Oct 2023 10:28:03 -0400 Subject: [PATCH] fix: (IAC-1174) Revert the Single AZ Changes --- docs/CONFIG-VARS.md | 1 - examples/sample-input-singlestore.tfvars | 3 --- main.tf | 11 ++++------- variables.tf | 6 ------ 4 files changed, 4 insertions(+), 17 deletions(-) diff --git a/docs/CONFIG-VARS.md b/docs/CONFIG-VARS.md index 9ca0f363..baa44f58 100644 --- a/docs/CONFIG-VARS.md +++ b/docs/CONFIG-VARS.md @@ -209,7 +209,6 @@ Custom policy: | autoscaling_enabled | Enable cluster autoscaling | bool | true | | | ssh_public_key | File name of public ssh key for jump and nfs VM | string | "~/.ssh/id_rsa.pub" | Required with `create_jump_vm=true` or `storage_type=standard` | | cluster_api_mode | Public or private IP for the cluster api| string|"public"|Valid Values: "public", "private" | -| enable_multi_zone | Set to true to deploy EKS Node Pools in multiple availability zones | boolean | false | **WARNING**: changing this from true to false after infrastructure creation is destructive. If you have an existing Viya deployment in your cluster, following the [SAS Viya Platform Operations backup and restore documentation](https://documentation.sas.com/?cdcId=itopscdc&cdcVersion=default&docsetId=itopsmigwlcm&docsetTarget=home.htm) is recommended before changing this. | ## Node Pools diff --git a/examples/sample-input-singlestore.tfvars b/examples/sample-input-singlestore.tfvars index 01aec9ff..e98e4c8c 100644 --- a/examples/sample-input-singlestore.tfvars +++ b/examples/sample-input-singlestore.tfvars @@ -32,9 +32,6 @@ default_nodepool_node_count = 2 default_nodepool_vm_type = "m5.2xlarge" default_nodepool_custom_data = "" -# This forces all worker nodes to run in a single zone and is required when deploying a 'singlestore' node pool. -enable_multi_zone = false - ## General efs_performance_mode = "maxIO" storage_type = "standard" diff --git a/main.tf b/main.tf index f39b5752..7b9d7ca3 100755 --- a/main.tf +++ b/main.tf @@ -97,13 +97,10 @@ module "eks" { cluster_endpoint_public_access = var.cluster_api_mode == "public" ? true : false cluster_endpoint_public_access_cidrs = local.cluster_endpoint_public_access_cidrs - # AWS requires two or more subnets in different Availability Zones for your cluster's control plane. - control_plane_subnet_ids = module.vpc.private_subnets - # Specifies the list of subnets in which the worker nodes of the EKS cluster will be launched. - subnet_ids = var.enable_multi_zone ? module.vpc.private_subnets : [module.vpc.private_subnets[0]] - vpc_id = module.vpc.vpc_id - tags = local.tags - enable_irsa = var.autoscaling_enabled + subnet_ids = module.vpc.private_subnets + vpc_id = module.vpc.vpc_id + tags = local.tags + enable_irsa = var.autoscaling_enabled ################################################################################ # Cluster Security Group ################################################################################ diff --git a/variables.tf b/variables.tf index 14270974..574d7465 100644 --- a/variables.tf +++ b/variables.tf @@ -232,12 +232,6 @@ variable "default_nodepool_metadata_http_put_response_hop_limit" { default = 1 } -variable "enable_multi_zone" { - description = "Set to true to deploy EKS Node Pools in multiple availability zones." - type = bool - default = false -} - ## Dynamic node pool config variable "node_pools" { description = "Node Pool Definitions."