Provides a resource for managing the main routing table of a VPC.
resource "aws_main_route_table_association" "a" {
vpc_id = aws_vpc.foo.id
route_table_id = aws_route_table.bar.id
}
This resource supports the following arguments:
vpc_id
- (Required) The ID of the VPC whose main route table should be setroute_table_id
- (Required) The ID of the Route Table to set as the new
main route table for the target VPCThis resource exports the following attributes in addition to the arguments above:
id
- The ID of the Route Table Associationoriginal_route_table_id
- Used internally, see __Notes__ belowOn VPC creation, the AWS API always creates an initial Main Route Table. This
resource records the ID of that Route Table under original_route_table_id
.
The "Delete" action for a main_route_table_association
consists of resetting
this original table as the Main Route Table for the VPC. You'll see this
additional Route Table in the AWS console; it must remain intact in order for
the main_route_table_association
delete to work properly.
create
- (Default 5m
)update
- (Default 2m
)delete
- (Default 5m
)