Skip to content

Commit 50c6897

Browse files
Remove Preview tags from DenyAction
1 parent 7679ef6 commit 50c6897

File tree

2 files changed

+20
-23
lines changed

2 files changed

+20
-23
lines changed

articles/governance/policy/concepts/effects.md

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Understand how effects work
33
description: Azure Policy definitions have various effects that determine how compliance is managed and reported.
44
author: timwarner-msft
5-
ms.date: 10/20/2022
5+
ms.date: 01/06/2023
66
ms.topic: conceptual
77
ms.author: timwarner
88
---
@@ -18,7 +18,7 @@ These effects are currently supported in a policy definition:
1818
- [Audit](#audit)
1919
- [AuditIfNotExists](#auditifnotexists)
2020
- [Deny](#deny)
21-
- [DenyAction (preview)](#denyaction-preview)
21+
- [DenyAction](#denyaction)
2222
- [DeployIfNotExists](#deployifnotexists)
2323
- [Disabled](#disabled)
2424
- [Manual (preview)](#manual-preview)
@@ -51,10 +51,10 @@ manages the evaluation and outcome and reports the results back to Azure Policy.
5151
Resource Manager mode.
5252
- **Deny** is then evaluated. By evaluating deny before audit, double logging of an undesired
5353
resource is prevented.
54-
- **Audit** is evaluated.
55-
- **Manual** is evaluated.
56-
- **AuditIfNotExists** is evaluated.
57-
- **denyAction** is evaluated last.
54+
- **Audit** is evaluated.
55+
- **Manual** is evaluated.
56+
- **AuditIfNotExists** is evaluated.
57+
- **denyAction** is evaluated last.
5858

5959
After the Resource Provider returns a success code on a Resource Manager mode request,
6060
**AuditIfNotExists** and **DeployIfNotExists** evaluate to determine whether additional compliance
@@ -453,28 +453,25 @@ location of the Constraint template to use in Kubernetes to limit the allowed co
453453
}
454454
}
455455
```
456-
## DenyAction (preview)
456+
## DenyAction
457457

458458
`DenyAction` is used to block requests on intended action to resources. The only supported action today is `DELETE`. This effect will help prevent any accidental deletion of critical resources.
459459

460460
### DenyAction evaluation
461461

462462
When a request call with an applicable action name and targeted scope is submitted, `denyAction` prevents the request from succeeding. The request is returned as a `403 (Forbidden)`. In the portal, the Forbidden can be viewed as a status on the deployment that was prevented by the policy
463-
assignment.
463+
assignment.
464464

465-
`Microsoft.Authorization/policyAssignments`, `Microsoft.Authorization/denyAssignments`, `Microsoft.Blueprint/blueprintAssignments`, `Microsoft.Resources/deploymentStacks`, and `Microsoft.Authorization/locks` are all exempt from DenyAction enforcement to prevent lockout scenarios.
466-
467-
> [!NOTE]
468-
> Under preview, assignments with `denyAction` effect will show a `Not Started` compliance state.
465+
`Microsoft.Authorization/policyAssignments`, `Microsoft.Authorization/denyAssignments`, `Microsoft.Blueprint/blueprintAssignments`, `Microsoft.Resources/deploymentStacks`, and `Microsoft.Authorization/locks` are all exempt from DenyAction enforcement to prevent lockout scenarios.
469466

470467
#### Subscription deletion
471-
Policy won't block removal of resources that happens during a subscription deletion.
468+
Policy won't block removal of resources that happens during a subscription deletion.
472469

473-
#### Resource group deletion
474-
Policy will evaluate resources that support location and tags against `DenyAction` policies during a resource group deletion. Only policies that have the `cascadeBehaviors` set to `deny` in the policy rule will block a resource group deletion. Policy won't block removal of resources that don't support location and tags nor any policy with `mode:all`.
470+
#### Resource group deletion
471+
Policy will evaluate resources that support location and tags against `DenyAction` policies during a resource group deletion. Only policies that have the `cascadeBehaviors` set to `deny` in the policy rule will block a resource group deletion. Policy won't block removal of resources that don't support location and tags nor any policy with `mode:all`.
475472

476473
#### Cascade deletion
477-
Cascade deletion occurs when deleting of a parent resource is implicitly deletes all its child resources. Policy won't block removal of child resources when a delete action targets the parent resources. For example, `Microsoft.Insights/diagnosticSettings` is a child resource of `Microsoft.Storage/storageaccounts`. If a `denyAction` policy targets `Microsoft.Insights/diagnosticSettings`, a delete call to the diagnostic setting (child) will fail, but a delete to the storage account (parent) will implicitly delete the diagnostic setting (child).
474+
Cascade deletion occurs when deleting of a parent resource is implicitly deletes all its child resources. Policy won't block removal of child resources when a delete action targets the parent resources. For example, `Microsoft.Insights/diagnosticSettings` is a child resource of `Microsoft.Storage/storageaccounts`. If a `denyAction` policy targets `Microsoft.Insights/diagnosticSettings`, a delete call to the diagnostic setting (child) will fail, but a delete to the storage account (parent) will implicitly delete the diagnostic setting (child).
478475

479476
[!INCLUDE [policy-denyAction](../../../../includes/azure-policy-deny-action.md)]
480477

@@ -483,16 +480,16 @@ Cascade deletion occurs when deleting of a parent resource is implicitly deletes
483480
The **details** property of the DenyAction effect has all the subproperties that define the action and behaviors.
484481

485482
- **actionNames** (required)
486-
- An _array_ that specifies what actions to prevent from being executed.
487-
- Supported action names are: `delete`.
483+
- An _array_ that specifies what actions to prevent from being executed.
484+
- Supported action names are: `delete`.
488485
- **cascadeBehaviors** (optional)
489-
- An _object_ that defines what behavior will be followed when the resource is being implicitly deleted by the removal of a resource group.
486+
- An _object_ that defines what behavior will be followed when the resource is being implicitly deleted by the removal of a resource group.
490487
- Only supported in policy definitions with [mode](./definition-structure.md#resource-manager-modes) set to `indexed`.
491-
- Allowed values are `allow` or `deny`.
492-
- Default value is `deny`.
488+
- Allowed values are `allow` or `deny`.
489+
- Default value is `deny`.
493490

494491
### DenyAction example
495-
Example: Deny any delete calls targeting database accounts that have a tag environment that equals prod. Since cascade behavior is set to deny, block any DELETE call that targets a resource group with an applicable database account.
492+
Example: Deny any delete calls targeting database accounts that have a tag environment that equals prod. Since cascade behavior is set to deny, block any DELETE call that targets a resource group with an applicable database account.
496493

497494
```json
498495
{

articles/governance/policy/concepts/evaluate-impact.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ reviews the request. When the policy definition effect is [Modify](./effects.md#
1212
[Append](./effects.md#deny), or [DeployIfNotExists](./effects.md#deployifnotexists), Policy alters
1313
the request or adds to it. When the policy definition effect is [Audit](./effects.md#audit) or
1414
[AuditIfNotExists](./effects.md#auditifnotexists), Policy causes an Activity log entry to be created
15-
for new and updated resources. And when the policy definition effect is [Deny](./effects.md#deny) or [DenyAction](./effects.md#denyaction-preview), Policy stops the creation or alteration of the request.
15+
for new and updated resources. And when the policy definition effect is [Deny](./effects.md#deny) or [DenyAction](./effects.md#denyaction), Policy stops the creation or alteration of the request.
1616

1717
These outcomes are exactly as desired when you know the policy is defined correctly. However, it's
1818
important to validate a new policy works as intended before allowing it to change or block work. The

0 commit comments

Comments
 (0)