-
Hello folks! I am working on adding support for the "delete" operation for the All of the clusters I'm interested in contain the following Google Cloud labels: But when I try to filter some of them by adding policies like:
I see that none of them got filtered.
or
But still, it doesn't work. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
cc/ @kapilt |
Beta Was this translation helpful? Give feedback.
-
@dbarranco I ran into this today while attempting to do something similar sample policy file:
As expected, the list of clusters was empty, even with the If you examine the raw data output from the
And if we examine the code that is currently being used to filter on the https://github.com/cloud-custodian/cloud-custodian/blob/master/c7n/filters/core.py#L230-L257 Although it looks like there might be a capacity to use a more advanced or different filter to accomplish the filtering. I am relatively new to I will also take a stab at putting up a PR to add |
Beta Was this translation helpful? Give feedback.
Ok, looks like you can work around this by using Generic Filters:
There's not a deep link to the section but here it is:
For my use case, I was able to successfully update the policy file:
Note that I changed it from a string, to a non-string value. This format takes advantage of the JSMEPath format as shown in the Generic Filters docs.