NetworkWatcherFlowLogArgs

data class NetworkWatcherFlowLogArgs(val enabled: Output<Boolean>? = null, val location: Output<String>? = null, val name: Output<String>? = null, val networkSecurityGroupId: Output<String>? = null, val networkWatcherName: Output<String>? = null, val resourceGroupName: Output<String>? = null, val retentionPolicy: Output<NetworkWatcherFlowLogRetentionPolicyArgs>? = null, val storageAccountId: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val targetResourceId: Output<String>? = null, val trafficAnalytics: Output<NetworkWatcherFlowLogTrafficAnalyticsArgs>? = null, val version: Output<Int>? = null) : ConvertibleToJava<NetworkWatcherFlowLogArgs>

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

Constructors

Link copied to clipboard
constructor(enabled: Output<Boolean>? = null, location: Output<String>? = null, name: Output<String>? = null, networkSecurityGroupId: Output<String>? = null, networkWatcherName: Output<String>? = null, resourceGroupName: Output<String>? = null, retentionPolicy: Output<NetworkWatcherFlowLogRetentionPolicyArgs>? = null, storageAccountId: Output<String>? = null, tags: Output<Map<String, String>>? = null, targetResourceId: Output<String>? = null, trafficAnalytics: Output<NetworkWatcherFlowLogTrafficAnalyticsArgs>? = null, version: Output<Int>? = null)

Properties

Link copied to clipboard
val enabled: Output<Boolean>? = null

Should Network Flow Logging be Enabled?

Link copied to clipboard
val location: Output<String>? = null

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>? = null

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

Link copied to clipboard
val networkSecurityGroupId: Output<String>? = null
Link copied to clipboard
val networkWatcherName: Output<String>? = null

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

Link copied to clipboard
val resourceGroupName: Output<String>? = null

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
val storageAccountId: Output<String>? = null

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

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

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

Link copied to clipboard
val targetResourceId: Output<String>? = null

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 version: Output<Int>? = null

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

Functions

Link copied to clipboard
open override fun toJava(): NetworkWatcherFlowLogArgs