Skip to content

Commit

Permalink
Update main.tf
Browse files Browse the repository at this point in the history
  • Loading branch information
Aakibgithuber authored Jan 30, 2024
1 parent ef79844 commit d92fc97
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Eks-terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ data "aws_subnets" "public" {
name = "vpc-id"
values = [data.aws_vpc.default.id]
}
filter {
name = "availabilityZone"
values = ["us-east-1a", "us-east-1b", "us-east-1c", "us-east-1d", "us-east-1f"]
}
}
#cluster provision
resource "aws_eks_cluster" "example" {
Expand Down Expand Up @@ -83,7 +87,15 @@ resource "aws_eks_node_group" "example" {
cluster_name = aws_eks_cluster.example.name
node_group_name = "Node-cloud"
node_role_arn = aws_iam_role.example1.arn
subnet_ids = data.aws_subnets.public.ids
subnet_ids = [
# Add only the subnets you want, excluding us-east-1e
data.aws_subnet_ids.public.ids[0], # us-east-1a
data.aws_subnet_ids.public.ids[1], # us-east-1b
data.aws_subnet_ids.public.ids[2], # us-east-1c
data.aws_subnet_ids.public.ids[3], # us-east-1d
data.aws_subnet_ids.public.ids[4], # us-east-1f
]


scaling_config {
desired_size = 1
Expand Down

0 comments on commit d92fc97

Please sign in to comment.