NetworkWatcherFlowLog

class NetworkWatcherFlowLog : KotlinCustomResource

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 a storage_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

Properties

Link copied to clipboard
val enabled: Output<Boolean>

Should Network Flow Logging be Enabled?

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val location: Output<String>

The location where the Network Watcher Flow Log resides. Changing this forces a new resource to be created. Defaults to the location of the Network Watcher.

Link copied to clipboard
val name: Output<String>

The name of the Network Watcher Flow Log. Changing this forces a new resource to be created.

Link copied to clipboard
Link copied to clipboard

The name of the Network Watcher. Changing this forces a new resource to be created.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The name of the resource group in which the Network Watcher was deployed. Changing this forces a new resource to be created.

Link copied to clipboard

A retention_policy block as documented below.

Link copied to clipboard

The ID of the Storage Account where flow logs are stored.

Link copied to clipboard
val tags: Output<Map<String, String>>?

A mapping of tags which should be assigned to the Network Watcher Flow Log.

Link copied to clipboard

The ID of the Resource for which to enable flow logs for. Changing this forces a new resource to be created.

Link copied to clipboard

A traffic_analytics block as documented below.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val version: Output<Int>?

The version (revision) of the flow log. Possible values are 1 and 2. Defaults to 1.