rebuy-de / aws-nuke

Nuke a whole AWS account and delete all its resources.
https://github.com/ekristen/aws-nuke
MIT License
5.77k stars 725 forks source link

Contribution Question #82

Closed tomvachon closed 6 years ago

tomvachon commented 6 years ago

What would you like to have proved in any pull request? Do you want output from the run, etc? I have a whole SLEW of services I'm going to add since I can understand this well enough to do a majority of them (thanks for making this go-idiot proof by the way)

tomvachon commented 6 years ago

Also, can we bump the AWS SDK to ^1.13? I have services I which are far newer than ^1.10

svenwltr commented 6 years ago

We currently only have the Travis build to see if the build succeeds. Besides that we will do a simple run against our account to see that there is no major break. Also we are running the current master on some of our accounts on daily basis, so we would see if something breaks.

This application has the advantage, that the resources are pretty isolated, so the blast radius is quite small if a single one fails.

It is currently not a very satisfying approach for checking the application stability. We might add some kind of integration tests later (eg create resources with Terraform and nuke them). The most interesting question would be how and when to run them.

TL;DR: Implement your feature, test it on your account and do a PR. We will take care about the rest.

Regarding the SDK update, see #83.

tomvachon commented 6 years ago

Awesome, lots more inbound in short order

tomvachon commented 6 years ago

I take the close back, does the utility handle pagination of List/Describe calls? Eg. https://docs.aws.amazon.com/sdk-for-go/api/service/rekognition/#Rekognition.ListCollections

If not, can you provide sample code for pagination needs and Ill hammer through those too

svenwltr commented 6 years ago

You have to handle the pagination by yourself. Usually the AWS requests take a SomethingInput and give you a SomethingOutput. The Output often provides a NextToken. There is a next page, if that one isn't nil. To get the next page you just have to add the NextToken to the Input and repeat the request.

See also:

Is that enough information?

svenwltr commented 6 years ago

I will prepare an example.

tomvachon commented 6 years ago

Thanks, I just barely understanding Go, so I appreciate it

svenwltr commented 6 years ago

The ECR Repository now contains an example: https://github.com/rebuy-de/aws-nuke/blob/master/resources/ecr-repository.go

tomvachon commented 6 years ago

Awesome thanks! I would imagine for the "marker" style API's its pretty close to the same just not "NextToken". Ill start cranking away again