Network Watcher Flow Log Args
Manages a Network Watcher Flow Log.
Note The
azure.network.NetworkWatcherFlowLog
creates a new storage lifecyle management rule that overwrites existing rules. Please make sure to use astorage_account
with no existing management rules, until the issue is fixed.
Example Usage
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
test:
type: azure:network:NetworkSecurityGroup
properties:
name: acctestnsg
location: ${example.location}
resourceGroupName: ${example.name}
testNetworkWatcher:
type: azure:network:NetworkWatcher
name: test
properties:
name: acctestnw
location: ${example.location}
resourceGroupName: ${example.name}
testAccount:
type: azure:storage:Account
name: test
properties:
name: acctestsa
resourceGroupName: ${example.name}
location: ${example.location}
accountTier: Standard
accountKind: StorageV2
accountReplicationType: LRS
enableHttpsTrafficOnly: true
testAnalyticsWorkspace:
type: azure:operationalinsights:AnalyticsWorkspace
name: test
properties:
name: acctestlaw
location: ${example.location}
resourceGroupName: ${example.name}
sku: PerGB2018
testNetworkWatcherFlowLog:
type: azure:network:NetworkWatcherFlowLog
name: test
properties:
networkWatcherName: ${testNetworkWatcher.name}
resourceGroupName: ${example.name}
name: example-log
targetResourceId: ${test.id}
storageAccountId: ${testAccount.id}
enabled: true
retentionPolicy:
enabled: true
days: 7
trafficAnalytics:
enabled: true
workspaceId: ${testAnalyticsWorkspace.workspaceId}
workspaceRegion: ${testAnalyticsWorkspace.location}
workspaceResourceId: ${testAnalyticsWorkspace.id}
intervalInMinutes: 10
Import
Network Watcher Flow Logs can be imported using the resource id
, e.g.
$ pulumi import azure:network/networkWatcherFlowLog:NetworkWatcherFlowLog watcher1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/networkWatchers/watcher1/flowLogs/log1
Constructors
Properties
The name of the Network Watcher. Changing this forces a new resource to be created.
The name of the resource group in which the Network Watcher was deployed. Changing this forces a new resource to be created.
A retention_policy
block as documented below.
The ID of the Storage Account where flow logs are stored.
The ID of the Resource for which to enable flow logs for. Changing this forces a new resource to be created.
A traffic_analytics
block as documented below.