r/aws_ec2_transit_gateway_route_table_association: Add configurable timeouts - #49924
Open
trh-ds wants to merge 2 commits into
Open
r/aws_ec2_transit_gateway_route_table_association: Add configurable timeouts#49924trh-ds wants to merge 2 commits into
trh-ds wants to merge 2 commits into
Conversation
…imeouts Association and disassociation of a Transit Gateway route table can take well over the previously hard-coded 5 minute create timeout, leaving users no way to extend it. Add a `timeouts` block to the resource, keeping the existing durations as the defaults (create 5m, delete 10m). The waiters and disassociateTransitGatewayRouteTable now take a timeout; all other callers pass the existing constants, so their behavior is unchanged. Closes hashicorp#42705 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U8tTGeYq33eHbEe9NZVzus
Contributor
Community GuidelinesThis comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀 Voting for Prioritization
Pull Request Authors
|
Contributor
|
✅ Thank you for correcting the previously detected issues! The maintainers appreciate your efforts to make the review process as smooth as possible. |
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U8tTGeYq33eHbEe9NZVzus
Member
|
Relates #42738 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
aws_ec2_transit_gateway_route_table_associationwaited on a hard-coded 5 minute create timeout, with no way for users to extend it. As reported in #42705, associations can legitimately take ~10 minutes, so the apply fails even though the association eventually succeeds:This adds a
timeoutsblock to the resource. The previously hard-coded durations become the defaults, so behavior is unchanged unless a user opts in:Implementation notes:
waitTransitGatewayRouteTableAssociationCreated/…DeletedanddisassociateTransitGatewayRouteTablenow take atimeout time.Duration, following the existing convention in this package (e.g.waitTransitGatewayUpdated).d.Timeout(...). The shared helpers used by the attachment resources (transitgateway_vpc_attachment.go,transitgateway_vpc_attachment_accepter.go,transitgateway_connect.go) andtransitgateway_policy_table_association.gopass the pre-existingtransitGatewayRouteTableAssociation{Created,Deleted}Timeoutconstants, so those code paths are untouched.Relations
Closes #42705
References
Output from Acceptance Testing
I do not have an AWS account available to run the Transit Gateway acceptance tests, so I have not run them. The change is limited to plumbing a configurable duration into the existing waiters; the defaults are byte-for-byte the previous constants, so
TestAccTransitGatewayRouteTableAssociation_*should be unaffected. Happy to add atimeouts-specific test case if a maintainer would like one.GenAI / LLM Assisted Development
This change was written with the assistance of Claude Code. I have reviewed the diff.