aws-nuke icon indicating copy to clipboard operation
aws-nuke copied to clipboard

Delete resources in all regions?

Open yosef-elementryx opened this issue 5 years ago • 13 comments

I'm looking to delete all the resources currently in my account regardless of region. Is there a way to delete resources in all regions without specifying each?

yosef-elementryx avatar Jun 03 '19 18:06 yosef-elementryx

Hello @yosef-elementryx. There is no way to do it without specifying every region. You have to specify each one. See https://docs.aws.amazon.com/general/latest/gr/rande.html for a full list of regions.

svenwltr avatar Jun 04 '19 14:06 svenwltr

@svenwltr Would this issue and or project in general be good for a GoLang newbie looking to contribute ? I'm keen.

wesgreentree avatar Jul 19 '19 18:07 wesgreentree

Hello @wesgreentree, before we can judge the complexity, we need to agree on how the configuration file should look like. Generally it should not be that hard, since the AWS SDK contains a list of all regions somewhere.

svenwltr avatar Jul 23 '19 08:07 svenwltr

@svenwltr Is anything on this page helpful ? https://docs.aws.amazon.com/sdk-for-go/api/aws/endpoints/

wesgreentree avatar Jul 25 '19 01:07 wesgreentree

This contains the mentioned list of regions, but we still need a proposal on how the aws-nuke config file should look like.

svenwltr avatar Jul 25 '19 07:07 svenwltr

There will never be a region called "ALL", so just use that.

robkinyon-lokavant avatar Mar 18 '20 18:03 robkinyon-lokavant

aws ec2 describe-regions --query "Regions[*].RegionName" --output text | xargs -n 1 | sort

m-31 avatar Jun 26 '20 09:06 m-31

regions:
- global
- ap-northeast-1
- ap-northeast-2
- ap-northeast-3
- ap-south-1
- ap-southeast-1
- ap-southeast-2
- ca-central-1
- eu-central-1
- eu-north-1
- eu-west-1
- eu-west-2
- eu-west-3
- sa-east-1
- us-east-1
- us-east-2
- us-west-1
- us-west-2

wonjoonSeol-WS avatar Apr 19 '21 09:04 wonjoonSeol-WS

Update, as some regions were updated in the past 2 years

regions:
- global
- us-east-2
- us-east-1
- us-west-1
- us-west-2
- af-south-1
- ap-east-1
- ap-southeast-3
- ap-south-1
- ap-northeast-3
- ap-northeast-2
- ap-southeast-1
- ap-southeast-2
- ap-northeast-1
- ca-central-1
- cn-north-1
- cn-northwest-1
- eu-central-1
- eu-west-1
- eu-west-2
- eu-south-1
- eu-west-3
- eu-north-1
- me-south-1
- sa-east-1

drzamich avatar Apr 02 '22 11:04 drzamich

It would be very beneficial to get this feature without actually having to generate this list all the time.

tzvatot avatar Sep 28 '22 08:09 tzvatot

Hello, not sure what is blocking here, wouldn't a all-region: true or regions: ["all"] be fine for the config part? It looks like we are kind of maintaining a list of all regions in this issue while we could fetch it dynamically instead :) We would have to care about disabled regions though if doing so

optplx avatar Dec 09 '22 09:12 optplx

image image

This is a sample AWS Nuke configuration file

Please refer to the documentation for more information:

https://github.com/rebuy-de/aws-nuke

AWS Nuke will only act on resources within the specified regions.

By default, if no regions are specified, AWS Nuke will not act on any resources.

regions:

  • ap-south-1
  • ap-northeast-3
  • ap-northeast-2
  • ap-southeast-1
  • ap-southeast-2
  • ap-northeast-1
  • ca-central-1
  • eu-central-1
  • eu-west-1
  • eu-west-2
  • eu-west-3
  • eu-north-1
  • me-south-1
  • sa-east-1
  • us-east-1
  • us-east-2
  • us-west-1
  • us-west-2

account-blocklist:

  • "999999999999" # production

accounts: "<Account-id>": {} # aws-nuke-example

pswalia2u avatar Feb 07 '23 06:02 pswalia2u

Updated list of regions as per today taken from here:

regions:
- global
- us-east-2
- us-east-1
- us-west-1
- us-west-2
- af-south-1
- ap-east-1
- ap-south-2
- ap-southeast-3
- ap-southeast-4
- ap-south-1
- ap-northeast-3
- ap-northeast-2
- ap-southeast-1
- ap-southeast-2
- ap-northeast-1
- ca-central-1
- ca-west-1
- eu-central-1
- eu-west-1
- eu-west-2
- eu-south-1
- eu-west-3
- eu-south-2
- eu-north-1
- eu-central-2
- il-central-1
- me-south-1
- me-central-1
- sa-east-1
- us-gov-east-1
- us-gov-west-1

sickdyd avatar Feb 08 '24 02:02 sickdyd