-
Notifications
You must be signed in to change notification settings - Fork 46
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
Filter resources when a specific tag is not present altogether #91
Comments
This's also what I am currently expected: Something like the following:
So far the current tags don't support this pattern. |
yes I tried the same :) |
Hey folks 👋 I will have a look into the issue and try to come up with a solution. Thanks for posting the issue. |
Thinking about it, I see three cases to be covered:
Any thoughts on this? |
Not sure if the case 3 is what I intent to expect. |
@showerlee let me know if this is better: You can now surround the tag key with NOT(...):
This deletes all EC2 instances without the owner tag (having any value). Note that tag expressions must be in Another example with multiple tag expressions:
This would mean delete all resources that have the FYI, I created a PR for this feature #101 (will be released soon if you are happy with this). |
Thanks @andreamaruccia (and everyone else) for testing and feedback. Released in https://github.com/cloudetc/awsweeper/releases/tag/v0.8.0. If you like the project and wouldn't mind, please leave a ⭐ |
Thanks @jckuester , I will try it in my aws environment later. |
Test this new feature and it looks pretty awesome. |
@showerlee I am glad that you like it. FYI, I am just working on bigger feature to support over 200 more resources (with tag support) in an automated way: #102 Stay tuned ;-) |
Hi @jckuester , just let you know there may be a bug happened for
The result after applying this policy shows up it will filler out all the iam users which actually shouldn't be filler out. For the other resources, they look good for now. |
As far I understand, we can filter resources based on a specific tag's value. For example, the following is going to select all ecs clusters based on a tag named environment whose value is not play
Is there any way we can filter resources, if a specific tag is not present altogether. So based on previous example, I want to delete all ecs_clusters where the tag environment is not present.
Thanks.
The text was updated successfully, but these errors were encountered: