I’m trying to enforce:
“disable-legacy-endpoints”: “true”,
to be true but it’s in a map that is in a list. I can’t seem to target only this value. I shared the rough draft playground.
Line 89 in mock file.
I’m trying to enforce:
“disable-legacy-endpoints”: “true”,
to be true but it’s in a map that is in a list. I can’t seem to target only this value. I shared the rough draft playground.
Line 89 in mock file.
If there’s a map inside a list, you can access it via dot notation.
This is the selector that grabs the value you’re looking for:
google_monitoring_alert_policy_filters = map google_container_cluster as _, r {
r.change.after.node_config[0].metadata["disable-legacy-endpoints"]
}
Here’s a modified playground example from what you provided initially:
https://play.sentinelproject.io/p/1bqxhtVRA5L