Skip to content
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

Do not use the aws_main_route_table_association & aws_default_route_table together. #95

Closed
willejs opened this issue Mar 8, 2018 · 5 comments

Comments

@willejs
Copy link

willejs commented Mar 8, 2018

As per the warning in the docs.

https://www.terraform.io/docs/providers/aws/r/default_route_table.html

@antonbabenko
Copy link
Member

Yes, this is a good note, but route is not specified inline in aws_default_route_table resource in this module, so it should not be a problem for a conflict.

Am I missing something?

@willejs
Copy link
Author

willejs commented Mar 14, 2018

yeah, it will destroy the routes in the default routing table, unless you define and import them. The docs state:

The aws_default_route_table behaves differently from normal resources, in that Terraform does not create this resource, but instead attempts to "adopt" it into management. We can do this because each VPC created has a Default Route Table that cannot be destroyed, and is created with a single route.

When Terraform first adopts the Default Route Table, it immediately removes all defined routes. It then proceeds to create any routes specified in the configuration. This step is required so that only the routes specified in the configuration present in the Default Route Table.

I think either managing these should be conditional, or not at all?

@antonbabenko
Copy link
Member

value vs problems suggests me to abandon the idea of managing them in this module completely. Will you be able to submit a PR?

@antonbabenko
Copy link
Member

Resolved as part of #111.

lorengordon added a commit to lorengordon/terraform-aws-vpc that referenced this issue Jun 22, 2018
Uses a data source to retrieve and preserve the routes
that are currently associated with the route table. This
works around prior problems with supporting this resource,
as described in terraform-aws-modules#95.

Fixes terraform-aws-modules#146
@github-actions
Copy link

github-actions bot commented Nov 5, 2022

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants