-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
RouteAlready exists error #44
Comments
Please provide the piece of code you are trying to run. Have you created VPC routes without using Terraform? |
No, I haven't created any VPC routes using Terraform. I am using the VPC module in the following fashion:
|
I observe the route table is created 3 times when I run Logs here:
|
Have you created VPC routes without using Terraform? Check in AWS console. It creates 3 routes because there are 3 private subnets and 3 NAT gateways (1 per each availability zone), which is correct behaviour. |
I haven't created VPC routes without using Terraform. Pretty sure about that. However, after your reply, I noticed I have defined only one private subnet - not three. Could this be the problem? I don't want 3 private subnets in my configuration. |
Please show the full module "vpc" block with actual amount of values (replace |
Here is the vpc block with actual values.
|
Thanks for the code, now I can see the error myself. Meanwhile, you can make this module to work for you if you set length of both lists of |
v1.10.0 has been released and the bug has been fixed there. |
Hello! I am using v1.26.0 and I am seeing a similar problem. Here is my VPC module description:
And when I apply my changes with Terraform, I get the result:
|
Seeing the same issue on v1.26.0. On first creation, it says it can't find a matching route for nat gateway with destination 0.0.0.0/0, however in AWS console, the route was created. Any plan after this attempts to add it again, and fails as a duplicate entry until the route is manually removed or imported into TF state. |
Hey Anton, I gave it a try and I'm still seeing the issue:
|
Hmm, strange... Does it still fail even after you rerun it and it destroyed @smastrorocco Thanks for the explanation. It sounds like a result of eventual consistency somewhere in the process. I did my best today to come up with the failing example and could not reproduce it (tried different regions, different values). Could you give it a try on your setup? |
@antonbabenko Yes, I've upgraded to v1.29.0 and it's working great. Thanks for the quick response. |
Getting this error when i tried to create vpc. I need help. |
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. |
Hello,
I see this error when converging with Terraform v0.11.1
I set
enable_nat_gateway
totrue
and have one private subnet enabled in the module.The text was updated successfully, but these errors were encountered: