-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathNetworkWatcher_Enabled_Audit.json
67 lines (67 loc) · 2.35 KB
/
NetworkWatcher_Enabled_Audit.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{
"properties": {
"displayName": "Network Watcher should be enabled",
"policyType": "BuiltIn",
"mode": "All",
"description": "Network Watcher is a regional service that enables you to monitor and diagnose conditions at a network scenario level in, to, and from Azure. Scenario level monitoring enables you to diagnose problems at an end to end network level view. It is required to have a network watcher resource group to be created in every region where a virtual network is present. An alert is enabled if a network watcher resource group is not available in a particular region.",
"metadata": {
"version": "3.0.0",
"category": "Network"
},
"version": "3.0.0",
"parameters": {
"effect": {
"type": "string",
"defaultValue": "AuditIfNotExists",
"allowedValues": [
"AuditIfNotExists",
"Disabled"
],
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
}
},
"listOfLocations": {
"type": "Array",
"metadata": {
"displayName": "Locations",
"description": "Audit if Network Watcher is not enabled for region(s).",
"strongType": "location",
"deprecated": true
},
"defaultValue": []
},
"resourceGroupName": {
"type": "String",
"metadata": {
"displayName": "NetworkWatcher resource group name",
"description": "Name of the resource group of NetworkWatcher, such as NetworkWatcherRG. This is the resource group where the Network Watchers are located."
},
"defaultValue": "NetworkWatcherRG"
}
},
"policyRule": {
"if": {
"field": "type",
"equals": "Microsoft.Network/virtualNetworks"
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.Network/networkWatchers",
"resourceGroupName": "[parameters('resourceGroupName')]",
"existenceCondition": {
"field": "location",
"equals": "[field('location')]"
}
}
}
},
"versions": [
"3.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/b6e2945c-0b7b-40f5-9233-7a5323b5cdc6",
"name": "b6e2945c-0b7b-40f5-9233-7a5323b5cdc6"
}