Skip to content

Commit 220cfd0

Browse files
authored
Spec for ProtectedSettingsFromKeyVault and AllowExtensionOperations (Azure#16590)
* KV changes * adding allowExtensionOperation * fixing examples
1 parent 8745de5 commit 220cfd0

File tree

3 files changed

+325
-1
lines changed

3 files changed

+325
-1
lines changed

specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/compute.json

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1723,7 +1723,7 @@
17231723
"x-ms-long-running-operation": true,
17241724
"x-ms-examples": {
17251725
"Update VM extension.": {
1726-
"$ref": "./examples/compute/UpdateVMExtensionWithSuppressFailureEnabled.json"
1726+
"$ref": "./examples/compute/UpdateVMExtension.json"
17271727
}
17281728
}
17291729
},
@@ -5425,6 +5425,9 @@
54255425
},
54265426
"Create a scale set with spot restore policy": {
54275427
"$ref": "./examples/compute/CreateAScaleSetWithSpotRestorePolicy.json"
5428+
},
5429+
"Create a VMSS with an extension with protectedSettingsFromKeyVault": {
5430+
"$ref": "./examples/compute/CreateAScaleSetWithProtectedSettingsFromKeyVault.json"
54285431
}
54295432
}
54305433
},
@@ -9554,6 +9557,10 @@
95549557
"suppressFailures": {
95559558
"type": "boolean",
95569559
"description": "Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false."
9560+
},
9561+
"protectedSettingsFromKeyVault": {
9562+
"type": "object",
9563+
"description": "The extensions protected settings that are passed by reference, and consumed from key vault"
95579564
}
95589565
},
95599566
"description": "Describes the properties of a Virtual Machine Extension."
@@ -9595,6 +9602,10 @@
95959602
"suppressFailures": {
95969603
"type": "boolean",
95979604
"description": "Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false."
9605+
},
9606+
"protectedSettingsFromKeyVault": {
9607+
"type": "object",
9608+
"description": "The extensions protected settings that are passed by reference, and consumed from key vault"
95989609
}
95999610
},
96009611
"description": "Describes the properties of a Virtual Machine Extension."
@@ -12610,6 +12621,10 @@
1261012621
"$ref": "#/definitions/VaultSecretGroup"
1261112622
},
1261212623
"description": "Specifies set of certificates that should be installed onto the virtual machines in the scale set. To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows)."
12624+
},
12625+
"allowExtensionOperations": {
12626+
"type": "boolean",
12627+
"description": "Specifies whether extension operations should be allowed on the virtual machine scale set. <br><br>This may only be set to False when no extensions are present on the virtual machine scale set."
1261312628
}
1261412629
},
1261512630
"description": "Describes a virtual machine scale set OS profile."
@@ -13380,6 +13395,10 @@
1338013395
"suppressFailures": {
1338113396
"type": "boolean",
1338213397
"description": "Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false."
13398+
},
13399+
"protectedSettingsFromKeyVault": {
13400+
"type": "object",
13401+
"description": "The extensions protected settings that are passed by reference, and consumed from key vault"
1338313402
}
1338413403
},
1338513404
"description": "Describes the properties of a Virtual Machine Scale Set Extension."
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,293 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "{subscription-id}",
4+
"resourceGroupName": "myResourceGroup",
5+
"vmScaleSetName": "{vmss-name}",
6+
"api-version": "2021-07-01",
7+
"parameters": {
8+
"sku": {
9+
"tier": "Standard",
10+
"capacity": 3,
11+
"name": "Standard_D1_v2"
12+
},
13+
"location": "westus",
14+
"properties": {
15+
"overprovision": true,
16+
"virtualMachineProfile": {
17+
"storageProfile": {
18+
"imageReference": {
19+
"sku": "2016-Datacenter",
20+
"publisher": "MicrosoftWindowsServer",
21+
"version": "latest",
22+
"offer": "WindowsServer"
23+
},
24+
"osDisk": {
25+
"caching": "ReadWrite",
26+
"managedDisk": {
27+
"storageAccountType": "Standard_LRS"
28+
},
29+
"createOption": "FromImage"
30+
}
31+
},
32+
"diagnosticsProfile": {
33+
"bootDiagnostics": {
34+
"storageUri": "http://{existing-storage-account-name}.blob.core.windows.net",
35+
"enabled": true
36+
}
37+
},
38+
"osProfile": {
39+
"computerNamePrefix": "{vmss-name}",
40+
"adminUsername": "{your-username}",
41+
"adminPassword": "{your-password}"
42+
},
43+
"extensionProfile": {
44+
"extensions": [
45+
{
46+
"name": "{extension-name}",
47+
"properties": {
48+
"autoUpgradeMinorVersion": false,
49+
"publisher": "{extension-Publisher}",
50+
"type": "{extension-Type}",
51+
"typeHandlerVersion": "{handler-version}",
52+
"settings": {},
53+
"protectedSettingsFromKeyVault": {
54+
"sourceVault": {
55+
"id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName"
56+
},
57+
"secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e"
58+
}
59+
}
60+
}
61+
]
62+
},
63+
"networkProfile": {
64+
"networkInterfaceConfigurations": [
65+
{
66+
"name": "{vmss-name}",
67+
"properties": {
68+
"primary": true,
69+
"enableIPForwarding": true,
70+
"ipConfigurations": [
71+
{
72+
"name": "{vmss-name}",
73+
"properties": {
74+
"subnet": {
75+
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
76+
}
77+
}
78+
}
79+
]
80+
}
81+
}
82+
]
83+
}
84+
},
85+
"upgradePolicy": {
86+
"mode": "Manual"
87+
}
88+
}
89+
}
90+
},
91+
"responses": {
92+
"200": {
93+
"body": {
94+
"sku": {
95+
"tier": "Standard",
96+
"capacity": 3,
97+
"name": "Standard_D1_v2"
98+
},
99+
"name": "{vmss-name}",
100+
"properties": {
101+
"singlePlacementGroup": true,
102+
"overprovision": true,
103+
"uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
104+
"virtualMachineProfile": {
105+
"storageProfile": {
106+
"imageReference": {
107+
"sku": "2016-Datacenter",
108+
"publisher": "MicrosoftWindowsServer",
109+
"version": "latest",
110+
"offer": "WindowsServer"
111+
},
112+
"osDisk": {
113+
"caching": "ReadWrite",
114+
"managedDisk": {
115+
"storageAccountType": "Standard_LRS"
116+
},
117+
"createOption": "FromImage"
118+
}
119+
},
120+
"diagnosticsProfile": {
121+
"bootDiagnostics": {
122+
"storageUri": "http://nsgdiagnostic.blob.core.windows.net",
123+
"enabled": true
124+
}
125+
},
126+
"osProfile": {
127+
"computerNamePrefix": "{vmss-name}",
128+
"adminUsername": "{your-username}",
129+
"secrets": [],
130+
"windowsConfiguration": {
131+
"provisionVMAgent": true,
132+
"enableAutomaticUpdates": true
133+
}
134+
},
135+
"extensionProfile": {
136+
"extensions": [
137+
{
138+
"name": "{extension-name}",
139+
"properties": {
140+
"autoUpgradeMinorVersion": false,
141+
"publisher": "{extension-Publisher}",
142+
"type": "{extension-Type}",
143+
"typeHandlerVersion": "{handler-version}",
144+
"settings": {},
145+
"protectedSettingsFromKeyVault": {
146+
"sourceVault": {
147+
"id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName"
148+
},
149+
"secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e"
150+
}
151+
}
152+
}
153+
]
154+
},
155+
"networkProfile": {
156+
"networkInterfaceConfigurations": [
157+
{
158+
"name": "{vmss-name}",
159+
"properties": {
160+
"dnsSettings": {
161+
"dnsServers": []
162+
},
163+
"primary": true,
164+
"enableIPForwarding": true,
165+
"ipConfigurations": [
166+
{
167+
"name": "{vmss-name}",
168+
"properties": {
169+
"subnet": {
170+
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
171+
},
172+
"privateIPAddressVersion": "IPv4"
173+
}
174+
}
175+
],
176+
"enableAcceleratedNetworking": false
177+
}
178+
}
179+
]
180+
}
181+
},
182+
"upgradePolicy": {
183+
"mode": "Manual"
184+
},
185+
"provisioningState": "Creating"
186+
},
187+
"location": "westus",
188+
"type": "Microsoft.Compute/virtualMachineScaleSets",
189+
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
190+
}
191+
},
192+
"201": {
193+
"body": {
194+
"sku": {
195+
"tier": "Standard",
196+
"capacity": 3,
197+
"name": "Standard_D1_v2"
198+
},
199+
"name": "{vmss-name}",
200+
"properties": {
201+
"singlePlacementGroup": true,
202+
"overprovision": true,
203+
"uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
204+
"virtualMachineProfile": {
205+
"storageProfile": {
206+
"imageReference": {
207+
"sku": "2016-Datacenter",
208+
"publisher": "MicrosoftWindowsServer",
209+
"version": "latest",
210+
"offer": "WindowsServer"
211+
},
212+
"osDisk": {
213+
"caching": "ReadWrite",
214+
"managedDisk": {
215+
"storageAccountType": "Standard_LRS"
216+
},
217+
"createOption": "FromImage"
218+
}
219+
},
220+
"diagnosticsProfile": {
221+
"bootDiagnostics": {
222+
"storageUri": "http://nsgdiagnostic.blob.core.windows.net",
223+
"enabled": true
224+
}
225+
},
226+
"osProfile": {
227+
"computerNamePrefix": "{vmss-name}",
228+
"adminUsername": "{your-username}",
229+
"secrets": [],
230+
"windowsConfiguration": {
231+
"provisionVMAgent": true,
232+
"enableAutomaticUpdates": true
233+
}
234+
},
235+
"extensionProfile": {
236+
"extensions": [
237+
{
238+
"name": "{extension-name}",
239+
"properties": {
240+
"autoUpgradeMinorVersion": false,
241+
"publisher": "{extension-Publisher}",
242+
"type": "{extension-Type}",
243+
"typeHandlerVersion": "{handler-version}",
244+
"settings": {},
245+
"protectedSettingsFromKeyVault": {
246+
"sourceVault": {
247+
"id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName"
248+
},
249+
"secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e"
250+
}
251+
}
252+
}
253+
]
254+
},
255+
"networkProfile": {
256+
"networkInterfaceConfigurations": [
257+
{
258+
"name": "{vmss-name}",
259+
"properties": {
260+
"dnsSettings": {
261+
"dnsServers": []
262+
},
263+
"primary": true,
264+
"enableIPForwarding": true,
265+
"ipConfigurations": [
266+
{
267+
"name": "{vmss-name}",
268+
"properties": {
269+
"subnet": {
270+
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
271+
},
272+
"privateIPAddressVersion": "IPv4"
273+
}
274+
}
275+
],
276+
"enableAcceleratedNetworking": false
277+
}
278+
}
279+
]
280+
}
281+
},
282+
"upgradePolicy": {
283+
"mode": "Manual"
284+
},
285+
"provisioningState": "Creating"
286+
},
287+
"location": "westus",
288+
"type": "Microsoft.Compute/virtualMachineScaleSets",
289+
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
290+
}
291+
}
292+
}
293+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
"suppressFailures": true,
1515
"settings": {
1616
"UserName": "[email protected]"
17+
},
18+
"protectedSettingsFromKeyVault": {
19+
"sourceVault": {
20+
"id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName"
21+
},
22+
"secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e"
1723
}
1824
}
1925
}
@@ -34,6 +40,12 @@
3440
"suppressFailures": true,
3541
"settings": {
3642
"UserName": "[email protected]"
43+
},
44+
"protectedSettingsFromKeyVault": {
45+
"sourceVault": {
46+
"id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName"
47+
},
48+
"secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e"
3749
}
3850
}
3951
}

0 commit comments

Comments
 (0)