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
Copy file name to clipboardExpand all lines: articles/network-watcher/quickstart-configure-network-security-group-flow-logs-from-arm-template.md
+7-83Lines changed: 7 additions & 83 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
---
2
-
title: 'Quickstart: Configure network security group flow logs by using an Azure Resource Manager template (ARM template)'
2
+
title: 'Quickstart: Configure Network Watcher network security group flow logs by using an Azure Resource Manager template (ARM template)'
3
3
description: Learn how to enable network security group (NSG) flow logs programmatically by using an Azure Resource Manager template (ARM template) and Azure PowerShell.
@@ -31,91 +31,15 @@ If you don't have an Azure subscription, create a [free account](https://azure.m
31
31
32
32
The template that we use in this quickstart is from [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/networkwatcher-flowlogs-create/).
The following code shows an NSG flow logs object and its parameters. To create a `Microsoft.Network/networkWatchers/flowLogs` resource, add this code to the resources section of your template:
For a complete overview of the NSG flow logs object properties, see [Microsoft.Network networkWatchers/flowLogs](/azure/templates/microsoft.network/networkwatchers/flowlogs).
75
-
76
-
## Create your template
77
-
78
-
If you're using ARM templates for the first time, see the following articles to learn more about ARM templates:
79
-
80
-
-[Deploy resources with ARM templates and Azure PowerShell](../azure-resource-manager/templates/deploy-powershell.md#deploy-local-template)
81
-
-[Tutorial: Create and deploy your first ARM template](../azure-resource-manager/templates/template-tutorial-create-first-template.md)
82
-
83
-
The following example is a complete template. It's also the simplest version of the template. The example contains the minimum parameters that are passed to set up NSG flow logs. For more examples, see the overview article [Configure NSG flow logs from an Azure Resource Manager template](network-watcher-nsg-flow-logging-azure-resource-manager.md).
84
-
85
-
### Example
86
-
87
-
The following template enables flow logs for an NSG, and then stores the logs in a specific storage account:
> - The resource name uses the format _ParentResource_ChildResource_. In our example, the parent resource is the regional Azure Network Watcher instance:
115
-
> -**Format**: NetworkWatcher_RegionName
116
-
> -**Example**: NetworkWatcher_centraluseuap
117
-
> -`targetResourceId` is the resource ID of the target NSG.
118
-
> -`storageId` is the resource ID of the destination storage account.
42
+
The highlighted code in the preceding sample shows an NSG flow logs resource definition.
#Customer intent: I need to enable the network security group flow logs by using a Bicep file.
12
+
---
13
+
14
+
# Quickstart: Configure network security group flow logs by using a Bicep file
15
+
16
+
In this quickstart, you learn how to enable [network security group (NSG) flow logs](network-watcher-nsg-flow-logging-overview.md) by using a Bicep file
We start with an overview of the properties of the NSG flow log object. We provide a sample Bicep file. Then, we deploy the Bicep file.
21
+
22
+
## Prerequisites
23
+
24
+
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
25
+
26
+
## Review the Bicep file
27
+
28
+
The Bicep file that we use in this quickstart is from [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/networkwatcher-flowlogs-create/).
When the deployment finishes, you should see a message indicating the deployment succeeded.
70
+
71
+
## Validate the deployment
72
+
73
+
You have two options to see whether your deployment succeeded:
74
+
75
+
- Your console shows `ProvisioningState` as `Succeeded`.
76
+
- Go to the [NSG flow logs portal page](https://portal.azure.com/#blade/Microsoft_Azure_Network/NetworkWatcherMenuBlade/flowLogs) to confirm your changes.
77
+
78
+
If there were issues with the deployment, see [Troubleshoot common Azure deployment errors with Azure Resource Manager](../azure-resource-manager/troubleshooting/common-deployment-errors.md).
79
+
80
+
## Clean up resources
81
+
82
+
You can delete Azure resources by using complete deployment mode. To delete a flow logs resource, specify a deployment in complete mode without including the resource you want to delete. Read more about [complete deployment mode](../azure-resource-manager/templates/deployment-modes.md#complete-mode).
83
+
84
+
You also can disable an NSG flow log in the Azure portal:
85
+
86
+
1. Sign in to the Azure portal.
87
+
1. Select **All services**. In the **Filter** box, enter **network watcher**. In the search results, select **Network Watcher**.
88
+
1. Under **Logs**, select **NSG flow logs**.
89
+
1. In the list of NSGs, select the NSG for which you want to disable flow logs.
90
+
1. Under **Flow logs settings**, select **Off**.
91
+
1. Select **Save**.
92
+
93
+
## Next steps
94
+
95
+
In this quickstart, you learned how to enable NSG flow logs by using a Bicep file. Next, learn how to visualize your NSG flow data by using one of these options:
96
+
97
+
- [Microsoft Power BI](network-watcher-visualize-nsg-flow-logs-power-bi.md)
0 commit comments