Skip to content

Instantly share code, notes, and snippets.

@pmatsinopoulos
Created August 28, 2023 07:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmatsinopoulos/815687ffaeef2f9a759e24d1a3f29652 to your computer and use it in GitHub Desktop.
Save pmatsinopoulos/815687ffaeef2f9a759e24d1a3f29652 to your computer and use it in GitHub Desktop.
AWS Private and Public Subnets - route_table_to_internet_gateway.tf
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