-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
Add a way to access the main route table #193
Comments
Good idea. Done! |
Now that the vpc resource has that parameter, how can I manipulate it? It seems I can just create a new route table, not edit the default one created with the vpc |
@alex88 This allows you to just reference the route table that AWS automatically creates from the VPC. You would need a route table resource to be able to manipulate it. |
@armon I tried but it creates a new route table, how can I reference an existing one? |
The only way I can think of would be to make the configuration for the route table explicit, and then manually write the state of the resource into the state file. If you just create the resource, then the next apply will try to create it since Terraform has no way to link the logical resource to the existing route table. So just putting the correct ID into the state file and calling refresh should do the trick. |
Oh ok so there is just a workaround, thanks! |
In the AWS provider, there is no way to access the main route table created with a vpc.
Which means that if I wanted to add routing rules, I need to create a new route table for the vpc, which is somehow inconvenient since I already have one.
This is explained here: http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html
What do you think of adding something like
aws_vpc.foo.main_route_table_id
to be able to reference the main route table of the vpc?The text was updated successfully, but these errors were encountered: