-
-
Notifications
You must be signed in to change notification settings - Fork 356
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
Fix Route53HostedZone loopvar scoping #814
Conversation
f5edb6c
to
25b12f7
Compare
25b12f7
to
e2776d6
Compare
hey @sbocinec What’s the version of your Go tool chain? The mentioned issue should be addressed in the newer Go version -> https://go.dev/blog/loopvar-preview Perhaps it’s worth just updating the |
I had only go |
Exactly. It seems like |
I would prefer updating the go version as it could solve other unknown issue they may have been introduced with the SDK v2 migration. Will see if there's any concern from the team and update here. |
Here is the PR to increase the golang version to 1.22.6 #821. |
This change has been merged. Do we still need this change or can we just close it? |
@james03160927 it should be addressed now, so I'm closing the PR. Thanks for driving the change and fixing the issue globally. |
Sounds good. Thanks! |
Description
I was testing the current
master
HEAD ofcloud-nuke
to test deletion of Route53 hosted zones to notice, it failed deleting any of the hosted zones in my AWS account (with 150+ hosted zones to delete). Using latestv0.37.2
worked without an issue.Inspecting the code, I noticed the issue was introduced on migration to aws SDK v2 in PR #796:
https://github.com/gruntwork-io/cloud-nuke/pull/796/files#diff-b2873b3af2b9d6f0921199d7c781bbe53417e4264feda1aa000eecb8906cb3cdL28-R28
The change caused, all values of the
HostedZonesDomains
map were pointing to the same zone address, causing the deletion problem.Additionally, due to the same loopvar issue, it was unable to delete the
ChangeResourceRecordSets
, as it was failing with:Attaching the error log:
route3-hosted-zone-error.txt
TODOs
Read the Gruntwork contribution guidelines.
nuke_sandbox
andnuke_phxdevops
jobs in.circleci/config.yml
have been updated with appropriate exclusions (either directly in the job or via the.circleci/nuke_config.yml
file) to prevent nuking IAM roles, groups, resources, etc that are important for the test accounts.Release Notes (draft)
Fixed Route53HostedZone loopvar scoping
Migration Guide