Skip to content
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

Shared transit gateways cannot be deleted #458

Closed
lauraseidler opened this issue Dec 12, 2024 · 4 comments · Fixed by #459
Closed

Shared transit gateways cannot be deleted #458

lauraseidler opened this issue Dec 12, 2024 · 4 comments · Fixed by #459
Labels
bug Something isn't working released

Comments

@lauraseidler
Copy link

Transit gateways that are shared from other accounts are picked up when listing transit gateways, but then are not found when trying to delete them (which makes sense).

When trying to nuke account 9876543210:

owner - EC2TGW - tgw-000000000000000 - [ID: "tgw-000000000000000", OwnerId: "1234567890"] - failed
time="2024-12-12T04:47:10Z" level=error msg="InvalidTransitGatewayID.NotFound: Transit Gateway tgw-000000000000000 was deleted or does not exist.\n\tstatus code: 400, request id: bc3ae8dc-1974-4c09-899e-507df4bfa41d"

We can see that the OwnerId does not match the account we're trying to nuke, and we can see in our infrastructure that this matches with transit gateways being shared from other accounts.

I'm not sure if this could/should be handled via Resource Access Manager to remove the share, but for sure deleting them directly will not work - I think it would make sense to skip any TGWs where the owner doesn't match the account being nuked.

@ekristen
Copy link
Owner

@lauraseidler agreed. I haven't had time to sit down to replicate this issue, it's been mentioned in the past. Perhaps a simple check against ownerId would be sufficient. Thanks for the report.

@ekristen ekristen added the bug Something isn't working label Dec 12, 2024
@lauraseidler
Copy link
Author

lauraseidler commented Dec 12, 2024

@ekristen I also believe the check should be sufficient - we can replicate it quite reliably, so I'll be happy to test a potential fix (no capacity to contribute myself right now, unfortunately)

@ekristen
Copy link
Owner

🎉 This issue has been resolved in version 3.35.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@lauraseidler
Copy link
Author

@ekristen thank you, we'll test it ASAP!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants