You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#CustomerIntent: As an Azure administrator, I need to enable NSG flow logs using a Bicep file so that I can log the traffic flowing through a network security group.
13
13
---
14
14
15
-
# Quickstart: Configure Azure Network Watcher NSG flow logs using a Bicep file
15
+
# Quickstart: Configure NSG flow logs using a Bicep file
16
16
17
-
In this quickstart, you learn how to enable [NSG flow logs](nsg-flow-logs-overview.md) using a Bicep file.
In this quickstart, you learn how to enable NSG flow logs using a Bicep file. For more information, see [NSG flow logs overview](nsg-flow-logs-overview.md) and [What is Azure Resource Manager?](../azure-resource-manager/management/overview.md)
- An Azure account with an active subscription. If you don't have one, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
24
-
25
-
- To deploy the Bicep files, either Azure CLI or PowerShell installed.
25
+
# [PowerShell](#tab/powershell)
26
26
27
-
# [Azure CLI](#tab/cli)
28
-
29
-
1.[Install Azure CLI locally](/cli/azure/install-azure-cli) to run the commands.
27
+
- An Azure account with an active subscription. If you don't have one, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
30
28
31
-
1. Sign in to Azure using the [az login](/cli/azure/reference-index#az-login) command.
29
+
-[Azure PowerShell installed locally](/powershell/azure/install-azure-powershell)to run the cmdlets. Use [Connect-AzAccount](/powershell/module/az.accounts/connect-azaccount) cmdlet to sign in to Azure.
32
30
33
-
# [PowerShell](#tab/powershell)
31
+
# [Azure CLI](#tab/cli)
34
32
35
-
1.[Install Azure PowerShell locally](/powershell/azure/install-azure-powershell) to run the cmdlets.
33
+
- An Azure account with an active subscription. If you don't have one, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
36
34
37
-
1. Sign in to Azure using the [Connect-AzAccount](/powershell/module/az.accounts/connect-azaccount) cmdlet.
35
+
-[Azure CLI installed locally](/cli/azure/install-azure-cli)to run the commands. Use [az login](/cli/azure/reference-index#az-login) command to sign in to Azure.
38
36
39
-
---
37
+
---
40
38
41
39
## Review the Bicep file
42
40
@@ -56,24 +54,35 @@ The highlighted code in the preceding sample shows an NSG flow log resource defi
56
54
57
55
This quickstart assumes that you have a network security group that you can enable flow logging on.
58
56
57
+
# [PowerShell](#tab/powershell)
58
+
59
59
1. Save the [Bicep file](https://github.com/Azure/azure-quickstart-templates/blob/master/quickstarts/microsoft.network/networkwatcher-flowLogs-create/main.bicep) as **main.bicep** to your local computer.
60
-
1. Deploy the Bicep file using either Azure CLI or Azure PowerShell.
61
60
62
-
# [Azure CLI](#tab/cli)
61
+
1. Deploy the Bicep file.
63
62
64
-
```azurecli
65
-
az group create --name exampleRG --location eastus
66
-
az deployment group create --resource-group exampleRG --template-file main.bicep
When the deployment finishes, you should see a message indicating the deployment succeeded.
75
+
76
+
# [Azure CLI](#tab/cli)
77
+
78
+
1. Save the [Bicep file](https://github.com/Azure/azure-quickstart-templates/blob/master/quickstarts/microsoft.network/networkwatcher-flowLogs-create/main.bicep) as **main.bicep** to your local computer.
79
+
80
+
1. Deploy the Bicep file.
81
+
82
+
```azurecli
83
+
az group create --name 'exampleRG' --location 'eastus'
84
+
az deployment group create --resource-group 'exampleRG' --template-file main.bicep
85
+
```
77
86
78
87
You'll be prompted to enter the resource ID of the existing network security group. The syntax of the network security group resource ID is:
79
88
@@ -83,6 +92,8 @@ This quickstart assumes that you have a network security group that you can enab
83
92
84
93
When the deployment finishes, you should see a message indicating the deployment succeeded.
85
94
95
+
---
96
+
86
97
## Validate the deployment
87
98
88
99
You have two options to see whether your deployment succeeded:
@@ -110,8 +121,8 @@ You also can disable an NSG flow log in the Azure portal:
110
121
111
122
## Related content
112
123
113
-
To learn how to visualize your NSG flow logs data, see:
124
+
In this quickstart, you learned how to enable NSG flow logs using a Bicep file. Next, learn how to visualize your NSG flow logs data using traffic analytics:
114
125
115
-
- [Visualizing NSG flow logs using Power BI](network-watcher-visualize-nsg-flow-logs-power-bi.md).
116
-
- [Visualize NSG flow logs using open source tools](network-watcher-visualize-nsg-flow-logs-open-source-tools.md).
0 commit comments