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.
More organization integrity guardrails ยท About IAM deny policies
{
"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)
- 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)
- Mechanism
- IAM deny policies: Principals named in the deny rules, on the resource the policy is attached to and its descendants.
- Taken from
- provider documentation, 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 organizationAWS, Service control policies (SCPs), organization integrity
- Deny billing, tax and account contact changesAWS, Service control policies (SCPs), organization integrity
- Restrict access to resources in a suspended OUAWS, Resource control policies (RCPs), organization integrity
- Restrict resource service usageGoogle Cloud, Organization Policy Service (managed and legacy constraints), organization integrity
- Restrict Shared VPC host project lien removalGoogle Cloud, Organization Policy Service (managed and legacy constraints), organization integrity
Related pages
Sources
- Deny deleting projects tagged prod, read 10 Nov 2026
- What it breaks, read 10 Nov 2026
- How to test it first, read 10 Nov 2026
Last reviewed 16 Nov 2026.