Skip to content

Commit

Permalink
Merge pull request #84 from ekristen/feat-enabled-regions
Browse files Browse the repository at this point in the history
feat: special all region for using only enabled regions
  • Loading branch information
ekristen authored Feb 23, 2024
2 parents b615c9e + c7e32a2 commit e9c8f48
Show file tree
Hide file tree
Showing 10 changed files with 804 additions and 20 deletions.
10 changes: 10 additions & 0 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,16 @@ The regions is a list of AWS regions that the tool will run against. The tool wi
configuration. If no regions are listed, then the tool will **NOT** run against any region. Regions must be explicitly
provided.
### All Enabled Regions
You may specify the special region `all` to run against all enabled regions. This will run against all regions that are
enabled in the account. It will not run against regions that are disabled. It will also automatically include the
special region `global` which is for specific global resources.

!!! important
The use of `all` will ignore all other regions specified in the configuration. It will only run against regions
that are enabled in the account.

## Accounts

The accounts section is a map of AWS Account IDs to their configuration. The account ID is the key and the value is the
Expand Down
25 changes: 21 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,33 @@ Remove all resources from an AWS account.
*aws-nuke* is stable, but it is likely that not all AWS resources are covered by it. Be encouraged to add missing
resources and create a Pull Request or to create an [Issue](https://github.com/ekristen/aws-nuke/issues/new).

## What's New in Version 3

This is not a comprehensive list, but here are some of the highlights:

* New Feature: Global Filters
* New Feature: Run Against All Enabled Regions
* New Feature: Bypass Alias Check - Allow the skip of an alias on an account
* Upcoming Feature: Filter Groups (**in progress**)
* Breaking Change: `root` command no longer triggers the run, must use subcommand `run` (alias: `nuke`)
* Completely rewrote the core of the tool as a dedicated library [libnuke](https://github.com/ekristen/libnuke)
* This library has over 95% test coverage which makes iteration and new features easier to implement.
* Semantic Releases with notifications on issues / pull requests
* New Resources
* Broke away from rebuy-de/aws-nuke project as a fork for reasons outlined in the history section

## History of this Fork

This is a full fork of the original tool written by the folks over at [rebuy-de](https://github.com/rebuy-de). This fork became necessary
after attempting to make contributions and respond to issues to learn that the current maintainers only have time to
work on the project about once a month and while receptive to bringing in other people to help maintain, made it clear
it would take time. Considering the feedback cycle was already weeks on initial communications, I had to make the hard
decision to fork and maintain it.
it would take time, but overall got the feeling that they wanted to maintain full control, which is understandable.
Considering the feedback cycle was already weeks on initial communications, I had to make the hard decision to fork
and maintain it.

Since then the rebuy-de team has taken up interest in responding to their issues and pull requests, but I have decided
to continue maintaining this fork as I have a few things I want to do with it that I don't think they will be interested.
Since then the rebuy-de team has taken up interest in responding to their issues and pull requests, however there are a
lot of outstanding feature requests and other tasks not being tackled, therefore I have decided to continue
maintaining this fork as I have a few things I want to do with it that I don't think they will be interested.

### Continued Attribution

Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/ekristen/aws-nuke
go 1.21.6

require (
github.com/aws/aws-sdk-go v1.50.4
github.com/aws/aws-sdk-go v1.50.24
github.com/ekristen/libnuke v0.10.1
github.com/fatih/color v1.16.0
github.com/golang/mock v1.6.0
Expand All @@ -29,9 +29,11 @@ require (
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/stevenle/topsort v0.2.0 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
golang.org/x/mod v0.9.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/tools v0.1.12 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
14 changes: 6 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
github.com/aws/aws-sdk-go v1.50.4 h1:jJNhxunBgfjmCSjMZ3INwQ19ZN3RoGEZfgSCUYF/NZw=
github.com/aws/aws-sdk-go v1.50.4/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
github.com/aws/aws-sdk-go v1.50.24 h1:3o2Pg7mOoVL0jv54vWtuafoZqAeEXLhm1tltWA2GcEw=
github.com/aws/aws-sdk-go v1.50.24/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/ekristen/libnuke v0.8.0 h1:dxs+RosOcstbzvxnLyWN4mq1mAuOqMRUi7LEBC8rk44=
github.com/ekristen/libnuke v0.8.0/go.mod h1:WhYx7LDAkvkXwwfhWCASRn7fbifF8kfyhNsUj5zCCVs=
github.com/ekristen/libnuke v0.9.1 h1:AoX1cggVTanP671Xuh6kJRv0HEp26NLqqPTzwYbz9I0=
github.com/ekristen/libnuke v0.9.1/go.mod h1:WhYx7LDAkvkXwwfhWCASRn7fbifF8kfyhNsUj5zCCVs=
github.com/ekristen/libnuke v0.10.0 h1:MBtly8gdZ8EBU/RPE1gI1aDpJlqWKKGxURcW7f8HVxY=
github.com/ekristen/libnuke v0.10.0/go.mod h1:WhYx7LDAkvkXwwfhWCASRn7fbifF8kfyhNsUj5zCCVs=
github.com/ekristen/libnuke v0.10.1 h1:+BRdDPuFR/5a8eJu1gpShXYbYs9tJ2kemM83EsbPp2g=
github.com/ekristen/libnuke v0.10.1/go.mod h1:WhYx7LDAkvkXwwfhWCASRn7fbifF8kfyhNsUj5zCCVs=
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
Expand Down Expand Up @@ -66,6 +60,8 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs=
golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
Expand Down Expand Up @@ -93,6 +89,8 @@ golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down
2 changes: 2 additions & 0 deletions mocks/generate_mocks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
SERVICE=$1
INTERFACE=$2

go get github.com/golang/mock/[email protected]

go run github.com/golang/mock/mockgen -source $(go list -m -mod=mod -f "{{.Dir}}" "github.com/aws/aws-sdk-go")/service/$SERVICE/$INTERFACE/interface.go -destination ../mocks/mock_$INTERFACE/mock.go
Loading

0 comments on commit e9c8f48

Please sign in to comment.