Unsupported type for looping: undefined

I am working on the policy to check the workspace tags and then check for the rule. But getting the following error.
unsupported type for looping: undefined
rule “main” not found in trace for policy
is_tag = filter tfrun.workspace.tags as _, tag {
tag is “dev”
} is not empty

main =rule when is_tag{
violations is 0

Is it because the tags are the list and I am trying to loop through the map ?


The is_tag filter expression looks fine, can you post a link to the policy example on the playground that includes the tfrun mock data that you are using to test your policy?

Here’s an example of what I would like you to share: Sentinel Playground