Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[network flowlogs create] update api versions and add outputs - new #13953

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ products:
- azure-resource-manager
urlFragment: networkwatcher-flowLogs-create
languages:
- json
- bicep
- json
---

# Enable NSG Flow Logs

![Azure Public Test Date](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.network/networkwatcher-flowLogs-create/PublicLastTestDate.svg)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ param storageAccountType string = 'Standard_LRS'

var storageAccountName = 'flowlogs${uniqueString(resourceGroup().id)}'

resource storageAccount 'Microsoft.Storage/storageAccounts@2021-09-01' = {
resource storageAccount 'Microsoft.Storage/storageAccounts@2023-01-01' = {
name: storageAccountName
location: location
sku: {
Expand All @@ -42,14 +42,15 @@ resource storageAccount 'Microsoft.Storage/storageAccounts@2021-09-01' = {
properties: {}
}

resource networkWatcher 'Microsoft.Network/networkWatchers@2022-01-01' = {
resource networkWatcher 'Microsoft.Network/networkWatchers@2023-09-01' = {
name: networkWatcherName
location: location
properties: {}
}

resource flowLog 'Microsoft.Network/networkWatchers/flowLogs@2022-01-01' = {
name: '${networkWatcherName}/${flowLogName}'
resource flowLog 'Microsoft.Network/networkWatchers/flowLogs@2023-09-01' = {
parent: networkWatcher
name: flowLogName
location: location
properties: {
targetResourceId: existingNSG
Expand All @@ -65,3 +66,8 @@ resource flowLog 'Microsoft.Network/networkWatchers/flowLogs@2022-01-01' = {
}
}
}

output location string = location
output name string = flowLog.name
output resourceGroupName string = resourceGroup().name
output resourceId string = flowLog.id
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"summary": "This template creates an Network Watcher-NSG Flow Logs resource for a given NSG",
"githubUsername": "damendo",
"docOwner": "damendo",
"dateUpdated": "2022-08-25"
"dateUpdated": "2024-04-02"
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var virtualNetworkName = 'virtualNetwork1'
var subnetName = 'subnet'
var networkSecurityGroupName = 'networkSecurityGroup1'

resource networkSecurityGroup 'Microsoft.Network/networkSecurityGroups@2022-01-01' = {
resource networkSecurityGroup 'Microsoft.Network/networkSecurityGroups@2023-09-01' = {
name: networkSecurityGroupName
location: location
properties: {
Expand All @@ -34,7 +34,7 @@ resource networkSecurityGroup 'Microsoft.Network/networkSecurityGroups@2022-01-0
}
}

resource virtualNetwork 'Microsoft.Network/virtualNetworks@2022-01-01' = {
resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-09-01' = {
name: virtualNetworkName
location: location
properties: {
Expand Down