Skip to content

Commit

Permalink
migrate changes from IAC-918 branch
Browse files Browse the repository at this point in the history
  • Loading branch information
jarpat committed Sep 21, 2023
1 parent 2e43fa5 commit e81ee49
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
3 changes: 3 additions & 0 deletions examples/sample-input-singlestore.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ 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"
Expand Down
1 change: 1 addition & 0 deletions files/policies/devops-iac-eks-policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
"iam:TagPolicy",
"iam:TagInstanceProfile",
"iam:TagOpenIDConnectProvider",
"iam:UpdateOpenIDConnectProviderThumbprint",
"iam:UntagPolicy",
"iam:UpdateAssumeRolePolicy",
"iam:UpdateAccessKey",
Expand Down
9 changes: 5 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,11 @@ module "eks" {
cluster_endpoint_public_access = var.cluster_api_mode == "public" ? true : false
cluster_endpoint_public_access_cidrs = local.cluster_endpoint_public_access_cidrs

subnet_ids = module.vpc.private_subnets
vpc_id = module.vpc.vpc_id
tags = local.tags
enable_irsa = var.autoscaling_enabled
control_plane_subnet_ids = module.vpc.private_subnets # AWS requires two or more subnets in different Availability Zones for your cluster's control plane.
subnet_ids = var.enable_multi_zone ? module.vpc.private_subnets : [module.vpc.private_subnets[0]] # Specifies the list of subnets in which the worker nodes of the EKS cluster will be launched.
vpc_id = module.vpc.vpc_id
tags = local.tags
enable_irsa = var.autoscaling_enabled
################################################################################
# Cluster Security Group
################################################################################
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,12 @@ variable "default_nodepool_metadata_http_put_response_hop_limit" {
default = 1
}

variable "enable_multi_zone" {
description = "Should be true to deploy EKS in multiple availability zones."
type = bool
default = false
}

## Dynamic node pool config
variable "node_pools" {
description = "Node Pool Definitions."
Expand Down

0 comments on commit e81ee49

Please sign in to comment.