-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set new routing tables as main in AWS #843
Comments
Here is the corresponding API command: http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ApiReference-cmd-ReplaceRouteTableAssociation.html |
This resource allows an existing Route Table to be assigned as the "main" Route Table of a VPC. This means that the Route Table will be used for any subnets within the VPC without an explicit Route Table assigned [1]. This is particularly useful in getting an Internet Gateway in place as the default for a VPC, since the automatically created Main Route Table does not have one [2]. Note that this resource is an abstraction over an association and does not map directly to a CRUD-able object in AWS. In order to retain a coherent "Delete" operation for this resource, we remember the ID of the AWS-created Route Table and reset the VPC's main Route Table to it when this resource is deleted. refs #843, #748 [1] http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html#RouteTableDetails [2] http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Internet_Gateway.html#Add_IGW_Routing
Just landed this in master - will come out with Feel free to take it for a spin on master - feedback welcome! |
🎉 🙇 |
This resource allows an existing Route Table to be assigned as the "main" Route Table of a VPC. This means that the Route Table will be used for any subnets within the VPC without an explicit Route Table assigned [1]. This is particularly useful in getting an Internet Gateway in place as the default for a VPC, since the automatically created Main Route Table does not have one [2]. Note that this resource is an abstraction over an association and does not map directly to a CRUD-able object in AWS. In order to retain a coherent "Delete" operation for this resource, we remember the ID of the AWS-created Route Table and reset the VPC's main Route Table to it when this resource is deleted. refs hashicorp#843, hashicorp#748 [1] http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html#RouteTableDetails [2] http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Internet_Gateway.html#Add_IGW_Routing
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Related to #748 but not the same issue.
A VPC's main routing table can be swapped out for another existing routing table in the AWS console. It would be nice if Terraform could assign a routing table resource as the main routing table of a VPC.
I think that this issue, combined with #748, might be preventing Terraform from setting an Internet Gateway in the main routing table. Is that correct?
The text was updated successfully, but these errors were encountered: