This module will create a NSG flow log for an existing Network Security Group.
You can optionally enable traffic analytics.
param deploymentName string = 'nsgflowlog${utcNow()}'
module flowlog 'main.bicep' = {
name: deploymentName
scope: resourceGroup('MyNetworkWatcherRG')
params: {
flowlogName: 'MyFlowLogName'
networkWatcherName: 'MyExistingNetworkWatcherName'
flowLogStorageAccountId: 'StorageAccountResourceId'
nsgId: 'NsgResourceId'
}
}
param deploymentName string = 'nsgflowlog${utcNow()}'
module flowlog 'main.bicep' = {
name: deploymentName
scope: resourceGroup('MyNetworkWatcherRG')
params: {
flowlogName: 'MyFlowLogName'
networkWatcherName: 'MyExistingNetworkWatcherName'
flowLogStorageAccountId: 'StorageAccountResourceId'
nsgId: 'NsgResourceId'
logAnalyticsWorkspaceId: 'logAnalyticsResourceId'
}
}