Skip to content

Commit 2cedad3

Browse files
Merge pull request #274214 from halkazwini/nw-policy
Updates to the deployment policy
2 parents 1babc40 + 28bb40b commit 2cedad3

File tree

3 files changed

+11
-15
lines changed

3 files changed

+11
-15
lines changed
6.47 KB
Loading
-826 Bytes
Loading

articles/network-watcher/vnet-flow-logs-policy.md

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: halkazwini
66
ms.author: halkazwini
77
ms.service: network-watcher
88
ms.topic: how-to
9-
ms.date: 05/02/2024
9+
ms.date: 05/03/2024
1010
---
1111

1212
# Manage virtual network flow logs using Azure Policy
@@ -24,7 +24,7 @@ In this article, you learn how to use two built-in policies to manage your setup
2424

2525
## Audit flow logs configuration for virtual networks using a built-in policy
2626

27-
The **Audit flow logs configuration for every virtual network** policy audits all existing virtual networks in a scope by checking all Azure Resource Manager objects of type `Microsoft.Network/virtualNetwork` for linked flow logs via the flow log property of the virtual network. It then flags any virtual network that doesn't have flow logging enabled.
27+
The **Audit flow logs configuration for every virtual network** policy audits all existing virtual networks in a scope by checking all Azure Resource Manager objects of type `Microsoft.Network/virtualNetworks` for linked flow logs via the flow log property of the virtual network. It then flags any virtual network that doesn't have flow logging enabled.
2828

2929
To audit your flow logs using the built-in policy, follow these steps:
3030

@@ -64,7 +64,7 @@ To audit your flow logs using the built-in policy, follow these steps:
6464

6565
## Deploy and configure virtual network flow logs using a built-in policy
6666

67-
The **Deploy a flow log resource with target virtual network** policy checks all existing virtual networks in a scope by checking all Azure Resource Manager objects of type `Microsoft.Network/networkSecurityGroups`. It then checks for linked flow logs via the flow log property of the virtual network. If the property doesn't exist, the policy deploys a flow log.
67+
The **Deploy a flow log resource with target virtual network** policy checks all existing virtual networks in a scope by checking all Azure Resource Manager objects of type `Microsoft.Network/virtualNetworks`. It then checks for linked flow logs via the flow log property of the virtual network. If the property doesn't exist, the policy deploys a flow log.
6868

6969
> [!IMPORTANT]
7070
> We recommend disabling network security group flow logs before enabling virtual network flow logs on the same underlying workloads to avoid duplicate traffic recording and additional costs. For example, if you enable network security group flow logs on the network security group of a subnet, then you enable virtual network flow logs on the same subnet or parent virtual network, you might get duplicate logging (both network security group flow logs and virtual network flow logs generated for all supported workloads in that particular subnet).
@@ -89,6 +89,9 @@ To assign the *deployIfNotExists* policy, follow these steps:
8989

9090
:::image type="content" source="./media/vnet-flow-logs-policy/deploy-policy.png" alt-text="Screenshot that shows how to select the deployment policy in the Azure portal." lightbox="./media/vnet-flow-logs-policy/deploy-policy.png":::
9191

92+
> [!NOTE]
93+
> You need *Contributor* or *Owner* permission to use this policy.
94+
9295
1. Enter a name in **Assignment name** or use the default name, and then enter your name in **Assigned by**.
9396

9497
:::image type="content" source="./media/vnet-flow-logs-policy/assign-deploy-policy-basics.png" alt-text="Screenshot that shows the Basics tab of assigning a deployment policy in the Azure portal." lightbox="./media/vnet-flow-logs-policy/assign-deploy-policy-basics.png":::
@@ -97,25 +100,18 @@ To assign the *deployIfNotExists* policy, follow these steps:
97100

98101
| Setting | Value |
99102
| --- | --- |
103+
| **Effect** | Select **DeployIfNotExists** to enable the execution of the policy. The other available option is: **Disabled**.|
100104
| **Virtual Network Region** | Select the region of your virtual network that you're targeting with the policy. |
101105
| **Storage Account** | Select the storage account. The storage account must be in the same region as the virtual network. |
106+
| **Network Watcher RG** | Select the resource group of your Network Watcher instance. The flow logs created by the policy are saved into this resource group. |
102107
| **Network Watcher** | Select the Network Watcher instance of the selected region. |
108+
| **Number of days to retain flowlogs** | Select the number of days that you want to keep your flow logs data in the storage account. The default value is 30 days. If you don't want to apply any retention policy, enter **0**. |
103109

104110
:::image type="content" source="./media/vnet-flow-logs-policy/assign-deploy-policy-parameters.png" alt-text="Screenshot that shows the Parameters tab of assigning a deployment policy in the Azure portal." lightbox="./media/vnet-flow-logs-policy/assign-deploy-policy-parameters.png":::
105111

106-
1. Select **Next** or the **Remediation** tab. Select the following values:
107-
108-
| Setting | Value |
109-
| --- | --- |
110-
| **Create a remediation task** | Select the checkbox if you want the policy to affect existing resources not only newly created resources. |
111-
| **Create a Managed Identity** | Select the checkbox. |
112-
| **Type of Managed Identity** | Select the type of managed identity that you want to use. |
113-
| **System assigned identity location** | Select the region of your system assigned identity. |
114-
| **Scope** | Select the scope of your user-assigned identity. |
115-
| **Existing user assigned identities** | Select your user-assigned identity. |
112+
1. Select **Next** or the **Remediation** tab.
116113

117-
> [!NOTE]
118-
> You need *Contributor* or *Owner* permission to use this policy.
114+
1. Select **Create a remediation task** checkbox.
119115

120116
:::image type="content" source="./media/vnet-flow-logs-policy/assign-deploy-policy-remediation.png" alt-text="Screenshot that shows the Remediation tab of assigning a deployment policy in the Azure portal." lightbox="./media/vnet-flow-logs-policy/assign-deploy-policy-remediation.png":::
121117

0 commit comments

Comments
 (0)