jckuester / awsweeper

A tool for cleaning your AWS account
Mozilla Public License 2.0
480 stars 46 forks source link

Fix: Close Terraform AWS Provider binary #116

Closed jckuester closed 4 years ago

jckuester commented 4 years ago

The binary process of the Terraform AWS Provider kept running in the background after the awsweeper process terminated. This PR closes the provider process before awsweeper exits.

Other features/fixes in this PR are included by bumping up the version of terradozer to v0.1.2:

  1. Ignore non-existing resources (of type cty.Nil): This means, AWS instances that are in state TERMINATED, NAT gateways that are not available anymore, etc. are filtered out and not shown

  2. Fix panic of nil pointer dereference when trying to destroy a resource that doesn't exist anymore (however, nil pointer shouldn't happen anymore because of 1.)

  3. Offline mode: don't re-download Terraform provider binary if binary exists already in ~/.awsweeper/terraform-provider-aws_v2.68.0_x4