Skip to content
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

Release 0.5 has as assets terradozer #81

Closed
andreamaruccia opened this issue Feb 26, 2020 · 6 comments
Closed

Release 0.5 has as assets terradozer #81

andreamaruccia opened this issue Feb 26, 2020 · 6 comments

Comments

@andreamaruccia
Copy link

Weired stuff

@andreamaruccia andreamaruccia changed the title Release 0.5 has as assests terradozer Release 0.5 has as assets terradozer Feb 26, 2020
@jckuester
Copy link
Owner

jckuester commented Feb 28, 2020

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?

@skyzyx
Copy link

skyzyx commented Mar 1, 2020

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

@jckuester
Copy link
Owner

jckuester commented Mar 2, 2020

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?

@vsilgalis
Copy link

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

@jckuester
Copy link
Owner

jckuester commented Mar 6, 2020

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.

@andreamaruccia
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants