/
ASC_GCExtOnVmWithNoSAMI.json
57 lines (57 loc) · 1.83 KB
/
ASC_GCExtOnVmWithNoSAMI.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
{
"properties": {
"displayName": "Virtual machines' Guest Configuration extension should be deployed with system-assigned managed identity",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "The Guest Configuration extension requires a system assigned managed identity. Azure virtual machines in the scope of this policy will be non-compliant when they have the Guest Configuration extension installed but do not have a system assigned managed identity. Learn more at https://aka.ms/gcpol",
"metadata": {
"version": "1.0.1",
"category": "Security Center"
},
"version": "1.0.1",
"parameters": {
"effect": {
"type": "string",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"AuditIfNotExists",
"Disabled"
],
"defaultValue": "AuditIfNotExists"
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Compute/virtualMachines/extensions"
},
{
"field": "Microsoft.Compute/virtualMachines/extensions/publisher",
"equals": "Microsoft.GuestConfiguration"
}
]
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.Compute/virtualMachines",
"name": "[first(split(field('fullName'), '/'))]",
"existenceCondition": {
"field": "identity.type",
"contains": "SystemAssigned"
}
}
}
},
"versions": [
"1.0.1"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/d26f7642-7545-4e18-9b75-8c9bbdee3a9a",
"name": "d26f7642-7545-4e18-9b75-8c9bbdee3a9a"
}