Created
November 18, 2021 21:56
-
-
Save NYARAS/8db8aed2d66d420115b24c796c084e45 to your computer and use it in GitHub Desktop.
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" "public" { | |
# The VPC ID. | |
vpc_id = aws_vpc.main.id | |
route { | |
# The CIDR block of the route | |
cidr_block = "0.0.0.0/0" | |
# Identifier of the VPC internet gateway or a virtual private gateway | |
gateway_id = aws_internet_gateway.main.id | |
} | |
# A map of tags to assign to the resource | |
tags = { | |
"Name" = "public" | |
} | |
} | |
resource "aws_route_table" "private1" { | |
# The VPC ID. | |
vpc_id = aws_vpc.main.id | |
route { | |
# The CIDR block of the route | |
cidr_block = "0.0.0.0/0" | |
# Identifier of the VPC NAT gateway. | |
gateway_id = aws_nat_gateway.gw1.id | |
} | |
# A map of tags to assign to the resource | |
tags = { | |
"Name" = "private1" | |
} | |
} | |
resource "aws_route_table" "private2" { | |
# The VPC ID. | |
vpc_id = aws_vpc.main.id | |
route { | |
# The CIDR block of the route | |
cidr_block = "0.0.0.0/0" | |
# Identifier of the VPC NAT gateway. | |
gateway_id = aws_nat_gateway.gw2.id | |
} | |
# A map of tags to assign to the resource | |
tags = { | |
"Name" = "private2" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment