Skip to content

Commit d60c584

Browse files
committed
Additional information for DenySettingsApplyToChildScopes
1 parent be5cc16 commit d60c584

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

articles/azure-resource-manager/bicep/deployment-stacks.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Create & deploy deployment stacks in Bicep
33
description: Describes how to create deployment stacks in Bicep.
44
ms.topic: how-to
55
ms.custom: devx-track-azurecli, devx-track-azurepowershell, devx-track-bicep
6-
ms.date: 05/31/2024
6+
ms.date: 06/19/2024
77
---
88

99
# Deployment stacks
@@ -47,7 +47,7 @@ Deployment stacks provide the following benefits:
4747
## Built-in roles
4848

4949
> [!WARNING]
50-
> Enforcement of the RBAC permission [Microsoft.Resources/deploymentStacks/manageDenySetting/action](/azure/role-based-access-control/permissions/management-and-governance) is rolling out across regions, including Government Clouds.
50+
> Enforcement of the RBAC permission [Microsoft.Resources/deploymentStacks/manageDenySetting/action](/azure/role-based-access-control/permissions/management-and-governance) is rolling out across regions, including Government Clouds.
5151
5252
There are two built-in roles for deployment stack:
5353

@@ -664,24 +664,29 @@ To add a managed resource, add the resource definition to the underlying Bicep f
664664

665665
To delete a managed resource, remove the resource definition from the underlying Bicep files, and then run the update command or rerun the create command. For more information, see [Update deployment stacks](#update-deployment-stacks).
666666

667-
## Protect managed resources against deletion
667+
## Protect managed resources
668668

669-
When creating a deployment stack, it's possible to assign a specific type of permissions to the managed resources, which prevents their deletion by unauthorized security principals. These settings are referred to as deny settings. You want to store the stack at a parent scope.
669+
You can assign specific permissions to the managed resources of a deployment stack to prevent unauthorized security principals from deleting or updating them. These permissions are referred to as deny settings. You want to store stacks at parent scope. For example, to protect resources in a subscription, you must place the stack at the parent scope, which is the immediate parent management group.
670+
671+
The deny setting only applies to the [control plane operations](../management/control-plane-and-data-plane.md#control-plane), not the [data plane operations](../management/control-plane-and-data-plane.md#data-plane). For example, storage accounts and key vaults are created through the control plane, allowing them to be managed by a deployment stack. However, child resources like secrets or blob containers, which are created through the data plane, cannot be managed by a deployment stack.
672+
673+
The deny setting only applies to explicitly created resources, not implicitly created ones. For example, a managed AKS cluster creates multiple other services to support it, such as a virtual machine. In this case, since the virtual machine is not defined in the Bicep file and is an implicitly created resource, it is not subject to the deployment stack deny settings.
670674

671675
> [!NOTE]
672676
> The latest release requires specific permissions at the stack scope in order to:
673677
>
674-
> - Create or update a deployment stack and set the deny setting to a value other than "None".
675-
> - Update or delete a deployment stack with an existing deny setting of something other than "None"
678+
> - Create or update a deployment stack and configure deny setting to a value other than `None`.
679+
> - Update or delete a deployment stack with an existing deny setting of a value other than `None`.
676680
>
677-
> Use the [built-in roles](#built-in-roles) to grant the permissions.
681+
> Use the deployment stack [built-in roles](#built-in-roles) to grant permissions.
678682
679683
# [PowerShell](#tab/azure-powershell)
680684

681685
The Azure PowerShell includes these parameters to customize the deny-assignment:
682686

683687
- `DenySettingsMode`: Defines the operations that are prohibited on the managed resources to safeguard against unauthorized security principals attempting to delete or update them. This restriction applies to everyone unless explicitly granted access. The values include: `None`, `DenyDelete`, and `DenyWriteAndDelete`.
684-
- `DenySettingsApplyToChildScopes`: Deny settings are applied to nested resources under managed resources.
688+
- `DenySettingsApplyToChildScopes`: When specified, the deny setting mode configuration also applies to the child scope of the managed resources. For example, a
689+
Bicep file defines a _Microsoft.Sql/servers_ resource (parent) and a _Microsoft.Sql/servers/databases_ resource (child). If a deployment stack is created using the Bicep file with the `DenySettingsApplyToChildScopes` setting enabled and the `DenySettingsMode` set to `DenyWriteAndDelete`, you can't add any additional child resources to either the _Microsoft.Sql/servers_ resource or the _Microsoft.Sql/servers/databases_ resource.
685690
- `DenySettingsExcludedAction`: List of role-based management operations that are excluded from the deny settings. Up to 200 actions are permitted.
686691
- `DenySettingsExcludedPrincipal`: List of Microsoft Entra principal IDs excluded from the lock. Up to five principals are permitted.
687692

@@ -690,7 +695,8 @@ The Azure PowerShell includes these parameters to customize the deny-assignment:
690695
The Azure CLI includes these parameters to customize the deny-assignment:
691696

692697
- `deny-settings-mode`: Defines the operations that are prohibited on the managed resources to safeguard against unauthorized security principals attempting to delete or update them. This restriction applies to everyone unless explicitly granted access. The values include: `none`, `denyDelete`, and `denyWriteAndDelete`.
693-
- `deny-settings-apply-to-child-scopes`: Deny settings are applied to nested resources under managed resources.
698+
- `deny-settings-apply-to-child-scopes`: When specified, the deny setting mode configuration also applies to the child scope of the managed resources. For example, a
699+
Bicep file defines a _Microsoft.Sql/servers_ resource (parent) and a _Microsoft.Sql/servers/databases_ resource (child). If a deployment stack is created using the Bicep file with the `deny-settings-apply-to-child-scopes` setting enabled and the `deny-settings-mode` set to `denyWriteAndDelete`, you can't add any additional child resources to either the _Microsoft.Sql/servers_ resource or the _Microsoft.Sql/servers/databases_ resource.
694700
- `deny-settings-excluded-actions`: List of role-based access control (RBAC) management operations excluded from the deny settings. Up to 200 actions are allowed.
695701
- `deny-settings-excluded-principals`: List of Microsoft Entra principal IDs excluded from the lock. Up to five principals are allowed.
696702

0 commit comments

Comments
 (0)