Last active
October 15, 2021 14:32
-
-
Save joakimhew/ea36cfaa780e3e1c0f8ac296dae110a7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################################################################################## | |
# # | |
# Create a new subnet in az-1a and associate it with the az-1a route table # | |
# # | |
######################################################################################## | |
resource "aws_subnet" "extra_az_1a" { | |
vpc_id = var.eks_vpc_id | |
cidr_block = "100.64.0.0/19" | |
availability_zone = "eu-west-1a" | |
depends_on = [ | |
aws_vpc_ipv4_cidr_block_association.secondary_cidr | |
] | |
} | |
resource "aws_route_table_association" "a" { | |
subnet_id = aws_subnet.extra_az_1a.id | |
route_table_id = var.az_1a_route_table_id | |
} | |
######################################################################################## | |
# # | |
# Create a new subnet in az-1b and associate it with the az-1b route table # | |
# # | |
######################################################################################## | |
resource "aws_subnet" "extra_az_1b" { | |
vpc_id = var.eks_vpc_id | |
cidr_block = "100.64.32.0/19" | |
availability_zone = "eu-west-1b" | |
depends_on = [ | |
aws_vpc_ipv4_cidr_block_association.secondary_cidr | |
] | |
} | |
resource "aws_route_table_association" "b" { | |
subnet_id = aws_subnet.extra_az_1b.id | |
route_table_id = var.az_1b_route_table_id | |
} | |
######################################################################################## | |
# # | |
# Create a new subnet in az-1c and associate it with the az-1c route table # | |
# # | |
######################################################################################## | |
resource "aws_subnet" "extra_az_1c" { | |
vpc_id = var.eks_vpc_id | |
cidr_block = "100.64.64.0/19" | |
availability_zone = "eu-west-1c" | |
depends_on = [ | |
aws_vpc_ipv4_cidr_block_association.secondary_cidr | |
] | |
} | |
resource "aws_route_table_association" "c" { | |
subnet_id = aws_subnet.extra_az_1c.id | |
route_table_id = var.az_1c_route_table_id | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment