-
Notifications
You must be signed in to change notification settings - Fork 11
/
arm-cloudsoe-automation.json
105 lines (105 loc) · 4.43 KB
/
arm-cloudsoe-automation.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
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"automationAccountResourceId": {
"type": "string",
"metadata": {
"description": "The resource ID of the automation account that is linked to the workspace."
}
},
"currentDateTime":{
"type": "string",
"defaultValue": "[utcnow('u')]"
},
"updateManagementScope": {
"type": "array",
"metadata": {
"description": "An array of subscription resource IDs that are in-scope of update management."
}
}
},
"variables": {
"automationAccountName": "[split(parameters('automationAccountResourceId'),'/')[8]]",
"autoUpdateGroup1StartDateTime":"[concat(dateTimeAdd(parameters('currentDateTime'),'P1D','yyyy-MM-dd'),'T03:00:00+10:00')]",
"autoUpdateGroup2StartDateTime":"[concat(dateTimeAdd(parameters('currentDateTime'),'P2D','yyyy-MM-dd'),'T03:00:00+10:00')]"
},
"resources": [
{
"type": "Microsoft.Automation/automationAccounts/softwareUpdateConfigurations",
"apiVersion": "2019-06-01",
"name": "[concat(variables('automationAccountName'), '/WindowsAutoUpdateGroup1')]",
"properties": {
"updateConfiguration": {
"operatingSystem": "Windows",
"windows": {
"includedUpdateClassifications": "Critical, Security, UpdateRollup, FeaturePack, ServicePack, Definition, Tools, Updates",
"rebootSetting": "IfRequired"
},
"targets": {
"azureQueries": [
{
"scope": "[parameters('updateManagementScope')]",
"tagSettings": {
"tags": {
"AutoUpdateGroup": [
"1"
]
},
"filterOperator": "All"
}
}
]
},
"duration": "PT2H"
},
"tasks": {},
"scheduleInfo": {
"startTime": "[variables('autoUpdateGroup1StartDateTime')]",
"expiryTime": "9999-12-31T23:59:59.9999999+00:00",
"interval": 2,
"frequency": "Day",
"timeZone": "Australia/Sydney"
}
}
},
{
"type": "Microsoft.Automation/automationAccounts/softwareUpdateConfigurations",
"apiVersion": "2019-06-01",
"name": "[concat(variables('automationAccountName'), '/WindowsAutoUpdateGroup2')]",
"properties": {
"updateConfiguration": {
"operatingSystem": "Windows",
"windows": {
"includedUpdateClassifications": "Critical, Security, UpdateRollup, FeaturePack, ServicePack, Definition, Tools, Updates",
"rebootSetting": "IfRequired"
},
"targets": {
"azureQueries": [
{
"scope": "[parameters('updateManagementScope')]",
"tagSettings": {
"tags": {
"AutoUpdateGroup": [
"2"
]
},
"filterOperator": "All"
}
}
]
},
"duration": "PT2H"
},
"tasks": {},
"scheduleInfo": {
"startTime": "[variables('autoUpdateGroup2StartDateTime')]",
"expiryTime": "9999-12-31T23:59:59.9999999+00:00",
"interval": 2,
"frequency": "Day",
"timeZone": "Australia/Sydney"
}
}
}
]
}