Skip to content
Cloud Governance Tools

Do not allow deletion of resource types

Do not allow deletion of resource types is an Azure guardrail written in Azure Policy. Blocks DELETE calls against the resource types you list, using the denyAction effect. What it breaks: the denyAction effect does not stop removal of child and extension resources when a delete targets the parent, and only supports the DELETE action.

More organization integrity guardrails ยท About Azure Policy

Built-in policy definition: Do not allow deletion of resource types
Definition ID: 78460a36-508a-49a4-b2b2-2f5ec564f4bb
Category: General
Supported effects: DenyAction, Disabled
policyRule (copied from the repository file):
{
    "if": {
      "field": "type",
      "in": "[parameters('listOfResourceTypesDisallowedForDeletion')]"
    },
    "then": {
      "effect": "[parameters('effect')]",
      "details": {
        "actionNames": [
          "delete"
        ]
      }
    }
  }
Blocks
Blocks DELETE calls against the resource types you list, using the denyAction effect.
Breaks
The denyAction effect does not stop removal of child and extension resources when a delete targets the parent, and only supports the DELETE action. (source)
Test before applying
As for every Azure Policy guardrail: how to test before enforcing
Mechanism
Azure Policy (built-in definitions): Resources at the scope of the assignment (management group, subscription, resource group) and their children, except notScopes and exemptions
Taken from
open source set, MIT License, Azure/azure-policy repository, https://raw.githubusercontent.com/Azure/azure-policy/master/LICENSE

What the source says

"This policy enables you to specify the resource types that your organization can protect from accidentals deletion by blocking delete calls using deny action effect." (read 10 Nov 2026).

On what it breaks: "Policy doesn't block removal of child and extension resources when a delete action targets the parent resources."

Sources

  1. Do not allow deletion of resource types, read 10 Nov 2026
  2. What it breaks, read 10 Nov 2026
  3. How to test it first, read 10 Nov 2026

Last reviewed 16 Nov 2026.