Skip to content

Commit dacf474

Browse files
authored
Merge pull request #268112 from mbender-ms/avnm-ado226669-v2
virtual network manager - update for mode
2 parents 99e70c1 + e1f733e commit dacf474

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

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

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,37 @@
11
---
2-
title: "Configuring Azure Policy with network groups in Azure Virtual Network Manager"
3-
description: Learn about how to utilize Azure Policy to configure a high scale and dynamic network group used with Azure Virtual Network Manager.
2+
title: "Configuring network groups with Azure Policy in Azure Virtual Network Manager"
3+
description: Learn how to configure network groups with Azure Policy in Azure Virtual Network Manager to create scalable and dynamic virtual network environments. Optimize your network group membership control with policy definitions and assignments.
44
author: mbender-ms
55
ms.author: mbender
66
ms.service: virtual-network-manager
77
ms.topic: conceptual
8-
ms.date: 04/14/2023
9-
ms.custom: template-concept, engagement-fy23
8+
ms.date: 03/05/2024
9+
ms.custom: template-concept, engagement-fy23, seo-fy24
10+
#customer intent: As a network administrator, I want to learn how to use Azure Policy to define dynamic network group membership in Azure Virtual Network Manager so that I can create scalable and dynamically adapting virtual network environments in my organization.
1011
---
1112

12-
# Configuring Azure Policy with network groups in Azure Virtual Network Manager
13+
# Configuring network groups with Azure Policy in Azure Virtual Network Manager
1314

1415
In this article, you learn how [Azure Policy](../governance/policy/overview.md) is used in Azure Virtual Network Manager to define dynamic network group membership. Dynamic network groups allow you to create scalable and dynamically adapting virtual network environments in your organization.
1516

1617
[!INCLUDE [virtual-network-manager-preview](../../includes/virtual-network-manager-preview.md)]
1718

1819
## Azure Policy overview
1920

20-
Azure Policy evaluates resources in Azure by comparing the properties of those resources to business rules. These business rules, described in JSON format, are known as [policy definitions](#policy-definition). Once your business rules have been formed, the policy definition is assigned to any scope of resources that Azure supports, such as management groups, subscriptions, resource groups, or individual resources. The assignment applies to all resources within the Resource Manager scope of that assignment. Learn more about scope usage with [Scope in Azure Policy](../governance/policy/concepts/scope.md).
21+
Azure Policy evaluates resources in Azure by comparing the properties of those resources to business rules. These business rules, described in JSON format, are known as [policy definitions](#network-group-policy-definition). Once your business rules are formed, the policy definition is assigned to any scope of resources that Azure supports, such as management groups, subscriptions, resource groups, or individual resources. The assignment applies to all resources within the Resource Manager scope of that assignment. Learn more about scope usage with [Scope in Azure Policy](../governance/policy/concepts/scope.md).
2122

2223
> [!NOTE]
2324
> Azure Policy is only used for the definition of dynamic network group membership.
2425
2526

26-
## Policy definition
27+
## Network group policy definition
2728

28-
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.
29+
Creating and implementing a policy in Azure Policy begins with creating a policy definition resource. Every policy definition has conditions for enforcement, and a defined effect that takes place if the conditions are met.
2930

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.
31+
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.
3132

3233
```json
33-
34+
"mode": "Microsoft.Network.Data",
3435
"policyRule": {
3536
"if": {
3637
"allOf": [
@@ -49,10 +50,9 @@ With network groups, your policy definition includes your conditional expression
4950
}
5051

5152
```
53+
5254
> [!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.
55+
> 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.
5656
5757
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.
5858

@@ -76,21 +76,21 @@ Here's a sample of a policy definition with the `policyType` property set to `Cu
7676
```
7777
Learn more about [policy definition structure](../governance/policy/concepts/definition-structure.md).
7878

79-
## Policy assignments
79+
## Create a policy assignment
8080

8181
Similar to Virtual Network Manager configurations, policy definitions don't immediately take effect when you create them. To begin applying, you must create a policy Assignment, which assigns a definition to evaluate at a given scope. Currently, all resources within the scope are evaluated against the definition, which allows a single reusable definition that you can assign at multiple places for more granular group membership control. Learn more information on the [Assignment Structure](../governance/policy/concepts/assignment-structure.md) for Azure Policy.
8282

8383
Policy definitions and assignment can be created through with API/PS/CLI or [Azure Policy Portal]().
8484

8585
## Required permissions
8686

87-
To use Azure Policy with network groups, users need the following permissions:
87+
To use network groups with Azure Policy, users need the following permissions:
8888
- `Microsoft.Authorization/policyassignments/Write` and `Microsoft.Authorization/policydefinitions/Write` are needed at the scope you're assigning.
8989
- `Microsoft.Network/networkManagers/networkGroups/join/action` action is needed on the target network group referenced in the **Add to network group** section. This permission allows for the adding and removing of objects from the target network group.
9090
- When using set definitions to assign multiple policies at the same time, concurrent `Microsoft.Network/networkManagers/networkGroups/join/action` permissions are needed on all definitions being assigned at the time of assignment.
9191

9292
To set the needed permissions, users can be assigned built-in roles with [role-based access control](../role-based-access-control/quickstart-assign-role-user-portal.md):
93-
- **Network Contributor** role to the target network group.
93+
- **Network Contributor** role to the target network group.
9494
- **Resource Policy Contributor** role at the target scope level.
9595

9696
For more granular role assignment, you can create [custom roles](../role-based-access-control/custom-roles-portal.md) using the `Microsoft.Network/networkManagers/networkGroups/join/action` permission and `policy/write` permission.
@@ -111,21 +111,21 @@ To set register the needed providers, use [Register-AzResourceProvider](/powersh
111111

112112
### Type filtering
113113

114-
When configuring your policy definitions, it's recommended to always include a **type** condition to scope it to virtual networks. This condition allows a policy to filter out non virtual network operations and improve the efficiency of your policy resources.
114+
When configuring your policy definitions, we recommend you include a **type** condition to scope it to virtual networks. This condition allows a policy to filter out non virtual network operations and improve the efficiency of your policy resources.
115115

116116
### Regional slicing
117117

118-
Policy resources are global, which means that any change takes effect on all resources under the assignment scope, regardless of region. If regional slicing and gradual rollout is a concern for you, it's recommended to also include a `where location in []` condition. Then, you can incrementally expand the locations list to gradually roll out the effect.
118+
Policy resources are global, which means that any change takes effect on all resources under the assignment scope, regardless of region. If regional slicing and gradual rollout is a concern for you, we recommend you include a `where location in []` condition. Then, you can incrementally expand the locations list to gradually roll out the effect.
119119

120120
### Assignment scoping
121-
If you're following management group best practices using [Azure management groups](../governance/management-groups/overview.md), it's likely you already have your resources organized in a hierarchy structure. Using assignments, you can assign the same definition to multiple distinct scopes within your hierarchy, allowing you to have higher granularity control of which resources are eligible for your network group
121+
If you're following management group best practices using [Azure management groups](../governance/management-groups/overview.md), it's likely you already have your resources organized in a hierarchy structure. Using assignments, you can assign the same definition to multiple distinct scopes within your hierarchy, allowing you to have higher granularity control of which resources are eligible for your network group.
122122

123123
### Deleting an Azure Policy definition associated with a network group
124124

125-
You may come across instances where you no longer need an Azure Policy definition. Instances include when a network group associated with a policy is deleted, or you have an unused policy that you no longer need. To delete the policy, you need to delete the policy association object, and then delete the policy definition in [Azure Policy](../governance/policy/tutorials/create-custom-policy-definition.md#clean-up-resources). Once deletion has been completed, the definition name can't be reused or re-referenced when associating a new definition to a network group.
125+
You can be instances where you no longer need an Azure Policy definition. Instances include when a network group associated with a policy is deleted, or you have an unused policy that you no longer need. To delete the policy, you need to delete the policy association object, and then delete the policy definition in [Azure Policy](../governance/policy/tutorials/create-custom-policy-definition.md#clean-up-resources). Once deletion is completed, the definition name can't be reused or re-referenced when associating a new definition to a network group.
126126

127127
## Next steps
128128

129129
- Create an [Azure Virtual Network Manager](create-virtual-network-manager-portal.md) instance.
130130
- Learn about [configuration deployments](concept-deployments.md) in Azure Virtual Network Manager.
131-
- Learn how to block network traffic with a [SecurityAdmin configuration](how-to-block-network-traffic-portal.md).
131+
- Learn how to block network traffic with a [SecurityAdmin configuration](how-to-block-network-traffic-portal.md).

0 commit comments

Comments
 (0)