-
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
[Bug]: incorrect duplicate route detection #36510
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
Hey @rus-geek 👋 Thank you for taking the time to raise this! I can't quite tell from the log snippet provided, but this error looks to be coming from the AWS API itself. Are you able to provide debug logging (redacted as needed) and/or test from the AWS CLI to see if it behaves the same? That's often a decent indicator in situations like this. |
This works with prior versions of the provider, so it's allowed by AWS. The bug appears to have been introduced in this PR which "fixed" the creation of duplicate resources. #36326 We are able to create this route directly with AWS, and I am also able to create the route using 5.35.0 instead of 5.41.0 |
The error message is being produced here: https://github.com/hashicorp/terraform-provider-aws/pull/36326/files#diff-75640a85d46fcb8ff09efe164520cac42e5e8ccb3c8d641bb96ef678ca472388R199 |
@rus-geek Thanks for raising this issue 👏. |
Warning This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them. Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed. |
This functionality has been released in v5.42.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. Thank you! |
Confirmed that this works as expected in 5.42.0. We are again able to create static routes that 'override' propagated routes. |
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. |
Terraform Core Version
1.3.3
AWS Provider Version
5.41.0
Affected Resource(s)
aws_route
Expected Behavior
Given a route table containing a propagated route to 0.0.0.0/0, I should be able to create a static route to 0.0.0.0/0 to override the propagated route.
Actual Behavior
terraform refuses to create the route, incorrectly indicating that it is a duplicate
Relevant Error/Panic Output Snippet
Error: RouteAlreadyExists: Route in Route Table (rtb-xxx) with destination (0.0.0.0/0) already exists
Terraform Configuration Files
Steps to Reproduce
Create a VPC with a propagated route to 0.0.0.0/0 with any next hop.
Attempt to add a static route to 0.0.0.0/0 with any next hop.
Debug Output
No response
Panic Output
Error: RouteAlreadyExists: Route in Route Table (rtb-xxx) with destination (0.0.0.0/0) already exists
Important Factoids
No response
References
from the AWS documentation: "If the destination of a propagated route is identical to the destination of a static route, the static route takes priority..."
https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html#route-tables-priority
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: