-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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 apply times out but route is still created and terraform does not track this #10666
Comments
I figured out what is going on. This is happening during apply.
Running terraform apply after that throws this errror:
Running terraform destroy after this cleans up everything but the route that the first apply created. Hence any terraform apply after that first timeout failure bomb as well. There is a timing issue here and it looks like the route timeout wait needs to be increased. |
This is a horrible hack but it works:
|
More comprehensive horrible hack that works around this issue:
|
This happens for me when the IP in destination_cidr_block is more specific than mask accompanying it. For example, supplying 172.1.2.3/16 will cause it to hang upon creation (and then error saying it can't be found), even though it is created successfully as 172.1.0.0. I suspect terraform is looking for the exact CIDR block specified, whereas AWS is removing the unnecessary extra detail. |
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! |
Community Note
Terraform v0.12.12
Affected Resource(s)
Terraform Configuration Files
Debug Output
See comments below
Panic Output
N/A
Expected Behavior
Terrraform apply creates the route and doesn't time out
Actual Behavior
terraform apply creates the route and times out not recording the created route state. Running terraform apply again fails because it says the route already exists. Terrafrom destroy does not remove the route because it isn't in the terraform state file.
Steps to Reproduce
terraform apply
terraform destroy
Important Factoids
route is pointing to a peering connection
The text was updated successfully, but these errors were encountered: