jckuester/awsweeper

Release 0.5 has as assets terradozer

andreamaruccia opened this issue · 6 comments

Weired stuff

I should have documented this, but didn't yet, because it's new. So, let me explain:

awsweeper uses the Terraform AWS Provider to delete resources, because this provider has all the delete functions for all AWS resources already implemented. This means, the only thing awsweeper needs to do, is call the Terraform AWS Provider with Type and ID (e.g., aws_instance and i-1234) to delete a resource.

Before v0.5.0, awsweeper had a very old version of the Terraform AWS Provider statically imported - not a good idea, because the provider is updated all the time to support new AWS resources. Since v0.5.0, awsweeper makes use of the Terraform Plugin Architecture, i.e., awsweeper downloads the newest Terraform AWS Provider binary and calls the binary via GRPC (same as Terraform core does).

The Terraform AWS Provider binary is downloaded to .terradozer/, as Terradozer is another tool that I wrote recently, which encapsulates the downloading and calling of the provider.

What do you recommend? Renaming .terradozer/ to .awsweeper/ and documenting it?

I think it's mostly just unclear why a project called "AWSweeper" has primary release binaries named "terradozer".

I understand. Maybe a solution could be to store the binary as default in $HOME/.awsweeper/<terraform-aws-provider-binary> (to have the binary in one place and reuse it between calls of awsweeper) with the option to override the path of the binary via a CLI parameter?

I think the issue is that because the binaries changed names the install script doesn't work anymore.

Finally, I got it 🤦‍♂️ I had no clue that I had a copy and paste mistake in my .gorelease.yml, sorry for that. So, forget what I explained in #81 (comment).

Fixed in v0.6.0, binaries should of course be named awsweeper as usual.

all good now! I can install and find the binary as expected