Skip to content

Commit a8bbcb4

Browse files
author
Michael Bender
committed
update for mode
1 parent 9558baa commit a8bbcb4

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

articles/virtual-network-manager/concept-azure-policy-integration.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ Azure Policy evaluates resources in Azure by comparing the properties of those r
2727

2828
Creating and implementing a policy in Azure Policy begins with creating a policy definition resource. Every policy definition has conditions under which it's enforced, and a defined effect that takes place if the conditions are met.
2929

30-
With network groups, your policy definition includes your conditional expression for matching virtual networks meeting your criteria, and specifies the destination network group where any matching resources are placed. The `addToNetworkGroup` effect is used to place resources in the destination network group. Here's a sample of a policy rule definition with the `addToNetworkGroup` effect.
30+
With network groups, your policy definition includes your conditional expression for matching virtual networks meeting your criteria, and specifies the destination network group where any matching resources are placed. The `addToNetworkGroup` effect is used to place resources in the destination network group. Here's a sample of a policy rule definition with the `addToNetworkGroup` effect. For all custom policies, the `mode` property is set to `Microsoft.Network.Data` to target the network group resource provider and is required for creating a policy definition for Azure Virtual Network Manager.
3131

3232
```json
33-
33+
"mode": "Microsoft.Network.Data",
3434
"policyRule": {
3535
"if": {
3636
"allOf": [
@@ -50,9 +50,7 @@ With network groups, your policy definition includes your conditional expression
5050

5151
```
5252
> [!IMPORTANT]
53-
> When defining a policy, the `networkGroupId` must be the full resource ID of the target network group as seen in the sample definition. It does not support parameterization in the policy definition.
54-
>
55-
>If you need to parameterize the network group, you can utilize an Azure Resource Manager template to create the policy definition and assignment.
53+
> When defining a policy, the `networkGroupId` must be the full resource ID of the target network group as seen in the sample definition. It does not support parameterization in the policy definition. If you need to parameterize the network group, you can utilize an Azure Resource Manager template to create the policy definition and assignment.
5654
5755
When Azure Policy is used with Azure Virtual Network Manager, the policy targets a [Resource Provider property](../governance/policy/concepts/definition-structure.md#resource-provider-modes) of `Microsoft.Network.Data`. Because of this, you need to specify a *policyType* of `Custom` in your policy definition. When you [create a policy to dynamically add members](how-to-exclude-elements.md) in Virtual Network Manager, this is applied automatically when the policy is created. You only need to choose `custom` when [creating a new policy definition](../governance/policy/tutorials/create-and-manage.md) through Azure Policy or other tooling outside of the Virtual Network Manager dashboard.
5856

0 commit comments

Comments
 (0)