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

Provide filter functions that test a dictionary property's key and value #228

Closed
ptiredknees opened this issue Mar 5, 2020 · 6 comments
Closed

Comments

@ptiredknees
Copy link
Contributor

Feature Request

Feature description :
At the moment you can filter resources to those that contain a particular tag.

Given I have resource that supports tags defined
When its tags does not include "Exempt"
Then ...

It would be good to support testing if a tag has a particular value.

Given I have resource that supports tags defined
When its tags have an entry where "Data Classification" is "Sensitive" 
Then ...

Given I have resource that supports tags defined
When its tags do not have an entry where "Data Classification" is "None" 
Then ...
@eerkunt
Copy link
Member

eerkunt commented Mar 5, 2020

hmm, did you mean #202 ?

@ptiredknees
Copy link
Contributor Author

ptiredknees commented Mar 5, 2020

I don't think so.
I'm looking for "if this object has a dictionary property and that dictionary has (or doesn't have) a matching key and value, then apply the rule".
Particularly useful for testing for a particular tag and value combination.

@eerkunt
Copy link
Member

eerkunt commented Mar 5, 2020

ah, I see.. Instead of just checking with value or key, you want to have key=value check.

Hmm, quite a good idea really. I will try to find a good way to do that.

@ptiredknees
Copy link
Contributor Author

I have knocked together a rough implementation. I'll get a PR in for you to look at.

@eerkunt
Copy link
Member

eerkunt commented Mar 31, 2020

Thanks for the amazing PR @ptiredknees ! 🎉

Closing this issue since, you already fixed it :)

@eerkunt eerkunt closed this as completed Mar 31, 2020
@ghost
Copy link

ghost commented Mar 31, 2020

This issue's conversation is now locked. If you want to continue this discussion please open a new issue.

@ghost ghost locked and limited conversation to collaborators Mar 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants