GCP - Deny Permissions for Specific Resources

Viewed 41

How do I set up explicit deny permissions for a specific resource in GCP? For example, I have 2 GKE clusters in my project, say "dev-gke" and "qa-gke". How do I ensure that folks in the team are denied permission to update/delete the "qa-gke" cluster while they can continue to do so on the "ts-dev" cluster.

I contemplated setting up a deny policy as explained here using denialCondition and resource.matchTag referencing a tag for "ts-qa" cluster.

  "denialCondition": {
      "title":  "QA Setup",
      "expression": "resource.matchTag('12345678/env', 'ts-qa')"

But as explained here tags are defined at an organization level and not at a resource level. And, I couldn't find out an equivalent of resource.matchTag for labels.

2 Answers
Related