/
GuestConfiguration_ArcESU_DINE.json
126 lines (126 loc) · 4.58 KB
/
GuestConfiguration_ArcESU_DINE.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
{
"properties": {
"displayName": "[Preview]: Enable Extended Security Updates (ESUs) license to keep Windows 2012 machines protected after their support lifecycle has ended.",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "Enable Extended Security Updates (ESUs) license to keep Windows 2012 machines protected even after their support lifecycle has ended. Learn How to prepare to deliver Extended Security Updates for Windows Server 2012 through AzureArc please visit https://learn.microsoft.com/en-us/azure/azure-arc/servers/prepare-extended-security-updates. For more details on pricing please visit https://aka.ms/ArcWS2012ESUPricing",
"metadata": {
"version": "1.0.0-preview",
"category": "Azure Arc",
"preview": true
},
"version": "1.0.0-preview",
"parameters": {
"ESULicenseResourceId": {
"type": "string",
"metadata": {
"displayName": "Extended Security Updates (ESUs) license Resource ID.",
"description": "Resource ID of the Extended Security Updates (ESUs) license.",
"portalReview": "true",
"assignPermissions": true
}
},
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"DeployIfNotExists",
"Disabled"
],
"defaultValue": "DeployIfNotExists"
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.HybridCompute/machines"
},
{
"field": "Microsoft.HybridCompute/imageOffer",
"like": "windows*"
},
{
"field": "Microsoft.HybridCompute/machines/licenseProfile.esuProfile.esuEligibility",
"equals": "Eligible"
}
]
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"roleDefinitionIds": [
"/providers/Microsoft.Authorization/roleDefinitions/48b40c6e-82e0-4eb3-90d5-19e40f49b624",
"/providers/Microsoft.Authorization/roleDefinitions/088ab73d-1256-47ae-bea9-9de8e7131f31"
],
"name": "default",
"type": "Microsoft.HybridCompute/machines/licenseProfiles",
"existenceCondition": {
"field": "Microsoft.HybridCompute/machines/licenseProfiles/esuProfile.assignedLicense",
"equals": "[parameters('ESULicenseResourceId')]"
},
"deployment": {
"properties": {
"mode": "incremental",
"parameters": {
"vmName": {
"value": "[field('name')]"
},
"location": {
"value": "[field('location')]"
},
"type": {
"value": "[field('type')]"
},
"ESULicenseResourceId": {
"value": "[parameters('ESULicenseResourceId')]"
}
},
"template": {
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"vmName": {
"type": "string"
},
"location": {
"type": "string"
},
"type": {
"type": "string"
},
"ESULicenseResourceId": {
"type": "string"
}
},
"resources": [
{
"condition": "[equals(toLower(parameters('type')), toLower('Microsoft.HybridCompute/machines'))]",
"apiVersion": "2023-06-20-preview",
"type": "Microsoft.HybridCompute/machines/licenseProfiles",
"name": "[concat(parameters('vmName'), '/default')]",
"location": "[parameters('location')]",
"properties": {
"esuProfile": {
"assignedLicense": "[parameters('ESULicenseResourceId')]"
}
}
}
]
}
}
}
}
}
},
"versions": [
"1.0.0-PREVIEW"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/4864134f-d306-4ff5-94d8-ea4553b18c97",
"name": "4864134f-d306-4ff5-94d8-ea4553b18c97"
}