Created
August 28, 2023 14:26
-
-
Save pmatsinopoulos/3d2180201cc33b79c55842097126d8f4 to your computer and use it in GitHub Desktop.
AWS Public and Private Subnets - route_table_to_nat_gateway.tf
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
resource "aws_route_table" "to_nat_gateway" { | |
vpc_id = aws_vpc.private_and_public_subnets.id | |
tags = { | |
"Name" = "access-to-nat-gateway" | |
} | |
} | |
resource "aws_route" "to_nat_gateway" { | |
route_table_id = aws_route_table.to_nat_gateway.id | |
destination_cidr_block = "0.0.0.0/0" | |
nat_gateway_id = aws_nat_gateway.private_and_public_subnets.id | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment