jckuester / awsweeper

A tool for cleaning your AWS account
Mozilla Public License 2.0
467 stars 45 forks source link

Filter resources NOT having a tag #101

Closed jckuester closed 4 years ago

ghost commented 4 years ago

@jckuester I would be using this feature, let me know if you need some tester :)

jckuester commented 4 years ago

@andrea-maruccia-leaseplan sure, is it ok for you to build a custom binary of this branch (simply run go build on it) for testing?

ghost commented 4 years ago

@andrea-maruccia-leaseplan sure, is it ok for you to build a custom binary of this branch (simply run go build on it) for testing?

yes no problem, should I test it with the latest commit on this branch?

jckuester commented 4 years ago

yes. please. I am basically done now.

ghost commented 4 years ago

seems to work well!

I used this config for ec2 deletion:

aws_instance:

aws_db_instance:

Nice work :)

jckuester commented 4 years ago

@andrea-maruccia-leaseplan just letting you know that in the new release aws_db_instance supports tags: https://github.com/cloudetc/awsweeper/releases/tag/v0.9.0. In fact, tag support is repaired for all resources now.

To see which resources support tags, see the list here: https://github.com/cloudetc/awsweeper#supported-resources

ghost commented 4 years ago

oh nice @jckuester this is really good news! Is this because you used awsls? what is it exactly?

jckuester commented 4 years ago

It's an ls command for AWS. You can list AWS resources and attributes via the command line instead of using the console. It's my new open-source project:

% awsls -profile myaccount -region us-west-2  -attribute tags "aws_iam_user"

TYPE           ID       REGION      CREATED               TAGS        
aws_iam_user   foo      us-west-2   2018-11-15 19:53:27               
aws_iam_user   janck    us-west-2   2018-06-30 11:25:34   Name=test 
ghost commented 4 years ago

nice thank you