Created
August 28, 2023 07:47
-
-
Save pmatsinopoulos/815687ffaeef2f9a759e24d1a3f29652 to your computer and use it in GitHub Desktop.
AWS Private and Public Subnets - route_table_to_internet_gateway.tf
This file contains 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_internet_gateway" { | |
vpc_id = aws_vpc.private_and_public_subnets.id | |
tags = { | |
"Name" = "access-to-internet" | |
} | |
} | |
resource "aws_route" "to_internet_gateway" { | |
route_table_id = aws_route_table.to_internet_gateway.id | |
destination_cidr_block = "0.0.0.0/0" | |
gateway_id = aws_internet_gateway.private_and_public_subnets.id | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment