-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
terraform: Error finding route after creating it: Unable to find matching route for Route Table #338
Comments
Same here, on 0.10.2. Running
Yet, in AWS web console I can see the route was created exactly as expected. Running
After doing |
I have the same problem in v0.10.7 |
Ran into this issue; route was created properly but terraform does not recognize it:
|
As a workaround; use state pull and manually edit the tfstate file and then state push works. Also this issue was closed in hashicorp/terraform#8542 |
Encountered the same issue in multiple provider and Terraform versions. Still having the same behavior using:
|
@AnthonyWC I have tried putting |
@smihajlovic-frame maybe you can try to increase aws_route configurable timeout for create, it's available since provider.aws v1.11.0. Default is 2 minutes. |
Hey, Just wanted to confirm that the timeout increase apparently fixed the issue:
|
@eLco @rafaljanicki I am also confirming that increasing timeout fixes the issue. |
I did not find that waiting 5m was sufficient for resolving my issue. |
@AnthonyWC I found this is a problem in the latest version of terraform and aws provider:
|
I found that my situation had to do with a malformed CIDR reference. I had 192.168.0.21/30 as my destination_cidr_block, but AWS was nicely adjusting that to the more accurate 192.168.0.20/30 when. Meanwhile, I guess terraform was looking for the one I specified to confirm completion rather than the adjusted one. Same error pattern, different cause. Hope this saves someone some trouble. |
I faced this issue once again in the below terraform version
|
Still experiencing this issues, successfully resolved using:
Terraform v0.12.8 |
Thanks, You saved my day! |
Additional validation to prevent the CIDR misalignment has been merged and will release with version 2.68.0 of the Terraform AWS Provider, likely tomorrow. Thanks to @ewbankkit for the implementation. 👍 If you are still having issues after upgrading to 2.68.0 when its released, please file a new issue. |
This has been released in version 2.68.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
This issue was originally opened by @FlorinAndrei as hashicorp/terraform#9756. It was migrated here as part of the provider split. The original body of the issue is below.
Terraform Version
Terraform v0.7.7
Terraform Configuration Files
https://dl.dropboxusercontent.com/u/29966/tf.zip
Expected Behavior
Create the infrastructure.
Actual Behavior
https://gist.github.com/FlorinAndrei/17c0a12e70c0a15671322030b419ec92
However, the routes, route tables, and NAT gateways were all created just fine. Subnet associations were set also.
Running
terraform plan
again produces this output:But that route exists already. If I try to apply the plan, I get this:
terraform refresh
produces this output:Please note how
gw.2
is not mentioned in the refresh.terraform plan -destroy
also does not mentiongw.2
Applying that
-destroy
plan works well and destroys all infrastructure.Steps to Reproduce
terraform apply
The text was updated successfully, but these errors were encountered: