# Deny deleting projects tagged prod

Facts read 10 Nov 2026. Page reviewed 16 Nov 2026.

Deny deleting projects tagged prod is a Google Cloud guardrail written in iAM deny policies. Denies the projects.delete permission to everyone except the project-admins group for projects tagged prod. What it breaks: google documents that the denial condition must use the CEL functions for evaluating resource tags, and other functions and operators are not supported.

```json
{
 "displayName": "Only project admins can delete production projects.",
 "rules": [
  {
   "denyRule": {
    "deniedPrincipals": [
     "principalSet://goog/public:all"
    ],
    "exceptionPrincipals": [
     "principalSet://goog/group/project-admins@example.com"
    ],
    "deniedPermissions": [
     "cloudresourcemanager.googleapis.com/projects.delete"
    ],
    "denialCondition": {
     "title": "Only for prod projects",
     "expression": "resource.matchTag('12345678/env', 'prod')"
    }
   }
  }
 ]
}
```

- **Blocks:** Denies the projects.delete permission to everyone except the project-admins group for projects tagged prod.
- **Breaks:** Google documents that the denial condition must use the CEL functions for evaluating resource tags, and other functions and operators are not supported. ([source](https://cloud.google.com/iam/docs/deny-access))
- **Test before applying:** Google documents troubleshooting deny policies with Policy Troubleshooter, which examines the allow, deny and Principal Access Boundary policies that affect a principal; it does not enforce in a preview mode. ([source](https://cloud.google.com/iam/docs/troubleshoot-policies))
- **Mechanism:** [IAM deny policies](/mechanisms/iam-deny/): Principals named in the deny rules, on the resource the policy is attached to and its descendants.
- **Taken from:** [provider documentation](https://cloud.google.com/iam/docs/deny-overview), provider documentation

## What the source says

"To solve this problem, you create a deny rule that denies the cloudresourcemanager.googleapis.com/projects.delete permission to everyone except the project-admins group for resources that are tagged prod :" (read 10 Nov 2026).

On what it breaks: "Other functions and operators are not supported."

## Related guardrails

- [Deny member accounts leaving the organization](/guardrails/aws-scp-deny-leave-org/): AWS, Service control policies (SCPs), organization integrity
- [Deny billing, tax and account contact changes](/guardrails/aws-scp-deny-billing-and-contact-changes/): AWS, Service control policies (SCPs), organization integrity
- [Restrict access to resources in a suspended OU](/guardrails/aws-rcp-restrict-suspended-ou-resources/): AWS, Resource control policies (RCPs), organization integrity
- [Restrict resource service usage](/guardrails/gcp-orgpolicy-restrict-service-usage/): Google Cloud, Organization Policy Service (managed and legacy constraints), organization integrity
- [Restrict Shared VPC host project lien removal](/guardrails/gcp-orgpolicy-restrict-xpn-lien-removal/): Google Cloud, Organization Policy Service (managed and legacy constraints), organization integrity

## Related pages

- [Restrict public IP access on new Vertex AI Workbench instances (Google Cloud Organization Policy Service)](/guardrails/gcp-orgpolicy-ainotebooks-restrict-public-ip/)
- [Disable root access on new Vertex AI Workbench notebooks and instances (Google Cloud Organization Policy Service)](/guardrails/gcp-orgpolicy-ainotebooks-disable-root-access/)
- [Define access to models on Vertex AI (Google Cloud Organization Policy Service)](/guardrails/gcp-orgpolicy-vertexai-allowed-models/)

## Sources

- Deny deleting projects tagged prod: https://cloud.google.com/iam/docs/deny-overview (read 10 Nov 2026)
- What it breaks: https://cloud.google.com/iam/docs/deny-access (read 10 Nov 2026)
- How to test it first: https://cloud.google.com/iam/docs/troubleshoot-policies (read 10 Nov 2026)

Last reviewed 16 Nov 2026. Canonical: https://cloudgovernancetools.com/guardrails/gcp-deny-project-delete-prod/
