Search code examples
azureazure-resource-managerazure-diagnosticsnetwork-security-groups

How can I enable Diagnostics on a Network Security Group using ARM templates


I have provisioned a Network Security Group (NSG) using an ARM template similar to this Azure NSG ARM template. I also used ARM to provision a storage account to store NSG logs.

I was able to enable Diagnostics in the Azure portal under the Monitoring section of the NSG resource and specify the storage account.

The portal doesn't expose the link between the storage account and the NSG in the Automation script section.

NSG Documentation doesn't provide the answer either.

How can I enable Diagnostics on a Network Security Group using ARM templates?


Solution

  • Please check this page https://azure.microsoft.com/en-us/documentation/articles/monitoring-enable-diagnostic-logs-using-template/ .

    It includes a specific example for the case of NSGs.