I’ve created two rules, the first one just checks for a string and is fine. However, the second rule is causing issues since I’m getting the error below.
“policy.sentinel:33:10: only a list or map can be indexed, got undefined”
I’m targeting line 222, and my goal is to enforce parts of this:
“metric.type="logging.googleapis.com/user/mysql/metric" AND resource.type="cloudsql_instance_database"”
except what is bold which is going to be unique to each user “mysql/metric” in my case. But everything before “mysql/metric”, including quotes, and after the AND should be enforced. However, I’m trying to print the “filter” value but that isn’t working either yet.
line 30-33 is my problem