kitchen-azurerm 0.13.0 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,368 +1,368 @@
1
- {
2
- "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3
- "contentVersion": "1.0.0.0",
4
- "parameters": {
5
- "location": {
6
- "type": "string",
7
- "metadata": {
8
- "description": "The location where the resources will be created."
9
- }
10
- },
11
- "vmSize": {
12
- "type": "string",
13
- "metadata": {
14
- "description": "The size of the VM to be created"
15
- }
16
- },
17
- "newStorageAccountName": {
18
- "type": "string",
19
- "metadata": {
20
- "description": "Unique DNS Name for the Storage Account where the Virtual Machine's disks will be placed."
21
- }
22
- },
23
- "adminUsername": {
24
- "type": "string",
25
- "metadata": {
26
- "description": "User name for the Virtual Machine."
27
- }
28
- },
29
- "adminPassword": {
30
- "type": "securestring",
31
- "metadata": {
32
- "description": "Password for the Virtual Machine."
33
- }
34
- },
35
- "dnsNameForPublicIP": {
36
- "type": "string",
37
- "metadata": {
38
- "description": "Unique DNS Name for the Public IP used to access the Virtual Machine."
39
- }
40
- },
41
- <%- unless os_disk_size_gb.to_s.empty? -%>
42
- "osDiskSizeGb": {
43
- "type": "int",
44
- "minValue": 1,
45
- "maxValue": 1023,
46
- "metadata": {
47
- "description": "Size of the OS disks in GB."
48
- }
49
- },
50
- <%- end -%>
51
- <%- unless custom_data.empty? -%>
52
- "customData": {
53
- "type": "string",
54
- "metadata": {
55
- "description": "Custom Data for the instance (e.g. cloud-init or script) - not compatible with winrm."
56
- }
57
- },
58
- <%- end -%>
59
- <%- if !existing_storage_account_blob_url.empty? -%>
60
- "existingStorageAccountBlobURL": {
61
- "type": "string",
62
- "metadata": {
63
- "description": "The URL of the existing storage account (blob) (without container)"
64
- }
65
- },
66
- <%- end -%>
67
- <%- if !existing_storage_account_container.empty? -%>
68
- "existingStorageAccountBlobContainer": {
69
- "type": "string",
70
- "metadata": {
71
- "description": "The Container Name for OS Images (blob)"
72
- }
73
- },
74
- <%- end -%>
75
- <%- if !image_url.empty? -%>
76
- "imageUrl": {
77
- "type": "string",
78
- "metadata": {
79
- "description": "An URL for a private Image (vhd)"
80
- }
81
- },
82
- "osType": {
83
- "type": "string",
84
- "metadata": {
85
- "description": "An OS Type (linux, windows)"
86
- }
87
- },
88
- <%- elsif !image_id.empty? -%>
89
- "imageId": {
90
- "type": "string",
91
- "metadata": {
92
- "description": "The id of a managed image"
93
- }
94
- },
95
- <%- else -%>
96
- "imagePublisher": {
97
- "type": "string",
98
- "defaultValue": "Canonical",
99
- "metadata": {
100
- "description": "Publisher for the VM, e.g. Canonical, MicrosoftWindowsServer"
101
- }
102
- },
103
- "imageOffer": {
104
- "type": "string",
105
- "defaultValue": "UbuntuServer",
106
- "metadata": {
107
- "description": "Offer for the VM, e.g. UbuntuServer, WindowsServer."
108
- }
109
- },
110
- "imageSku": {
111
- "type": "string",
112
- "defaultValue": "14.04.3-LTS",
113
- "metadata": {
114
- "description": "Sku for the VM, e.g. 14.04.3-LTS"
115
- }
116
- },
117
- "imageVersion": {
118
- "type": "string",
119
- "defaultValue": "latest",
120
- "metadata": {
121
- "description": "Either a date or latest."
122
- }
123
- },
124
- <%- end -%>
125
- "osDiskNameSuffix": {
126
- "type": "string",
127
- "defaultValue": "",
128
- "metadata": {
129
- "description": "A disk Name Suffix to make the disk name unique in existing storage accounts."
130
- }
131
- },
132
- "vmName": {
133
- "type": "string",
134
- "defaultValue": "vm",
135
- "metadata": {
136
- "description": "The vm name created inside of the resource group."
137
- }
138
- },
139
- "storageAccountType": {
140
- "type": "string",
141
- "defaultValue": "Standard_LRS",
142
- "metadata": {
143
- "description": "The type of storage to use (e.g. Standard_LRS or Premium_LRS)."
144
- }
145
- },
146
- "bootDiagnosticsEnabled": {
147
- "type": "string",
148
- "defaultValue": "true",
149
- "metadata": {
150
- "description": "Whether to enable (true) or disable (false) boot diagnostics. Default: false."
151
- }
152
- }
153
- },
154
- "variables": {
155
- "location": "[parameters('location')]",
156
- "OSDiskName": "osdisk",
157
- "nicName": "nic",
158
- "addressPrefix": "10.0.0.0/16",
159
- "subnetName": "Subnet",
160
- "subnetPrefix": "10.0.0.0/24",
161
- "storageAccountType": "[parameters('storageAccountType')]",
162
- "publicIPAddressName": "publicip",
163
- "publicIPAddressType": "Dynamic",
164
- "vmStorageAccountContainerName": "vhds",
165
- "vmName": "[parameters('vmName')]",
166
- "vmSize": "[parameters('vmSize')]",
167
- "virtualNetworkName": "vnet",
168
- "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
169
- "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]"
170
- },
171
- "resources": [
172
- {
173
- "apiVersion": "2017-05-10",
174
- "name": "pid-18d63047-6cdf-4f34-beed-62f01fc73fc2",
175
- "type": "Microsoft.Resources/deployments",
176
- "properties": {
177
- "mode": "Incremental",
178
- "template": {
179
- "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
180
- "contentVersion": "1.0.0.0",
181
- "resources": []
182
- }
183
- }
184
- },
185
- <%- unless use_managed_disks -%>
186
- <%- if existing_storage_account_blob_url.empty? -%>
187
- {
188
- "type": "Microsoft.Storage/storageAccounts",
189
- "name": "[parameters('newStorageAccountName')]",
190
- "apiVersion": "2015-05-01-preview",
191
- "location": "[variables('location')]",
192
- "properties": {
193
- "accountType": "[variables('storageAccountType')]"
194
- },
195
- "tags": {
196
- }
197
- },
198
- <%- end -%>
199
- <%- end -%>
200
- {
201
- "apiVersion": "2015-05-01-preview",
202
- "type": "Microsoft.Network/publicIPAddresses",
203
- "name": "[variables('publicIPAddressName')]",
204
- "location": "[variables('location')]",
205
- "properties": {
206
- "publicIPAllocationMethod": "[variables('publicIPAddressType')]",
207
- "dnsSettings": {
208
- "domainNameLabel": "[parameters('dnsNameForPublicIP')]"
209
- }
210
- },
211
- "tags": {
212
- }
213
- },
214
- {
215
- "apiVersion": "2015-05-01-preview",
216
- "type": "Microsoft.Network/virtualNetworks",
217
- "name": "[variables('virtualNetworkName')]",
218
- "location": "[variables('location')]",
219
- "properties": {
220
- "addressSpace": {
221
- "addressPrefixes": [
222
- "[variables('addressPrefix')]"
223
- ]
224
- },
225
- "subnets": [
226
- {
227
- "name": "[variables('subnetName')]",
228
- "properties": {
229
- "addressPrefix": "[variables('subnetPrefix')]"
230
- }
231
- }
232
- ]
233
- },
234
- "tags": {
235
- }
236
- },
237
- {
238
- "apiVersion": "2015-05-01-preview",
239
- "type": "Microsoft.Network/networkInterfaces",
240
- "name": "[variables('nicName')]",
241
- "location": "[variables('location')]",
242
- "dependsOn": [
243
- "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]",
244
- "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"
245
- ],
246
- "properties": {
247
- "ipConfigurations": [
248
- {
249
- "name": "ipconfig1",
250
- "properties": {
251
- "privateIPAllocationMethod": "Dynamic",
252
- "publicIPAddress": {
253
- "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
254
- },
255
- "subnet": {
256
- "id": "[variables('subnetRef')]"
257
- }
258
- }
259
- }
260
- ]
261
- },
262
- "tags": {
263
- }
264
- },
265
- {
266
- "apiVersion": "2017-03-30",
267
- "type": "Microsoft.Compute/virtualMachines",
268
- "name": "[variables('vmName')]",
269
- "location": "[variables('location')]",
270
- "dependsOn": [
271
- <%- unless use_managed_disks -%>
272
- <%- if existing_storage_account_blob_url.empty? -%>
273
- "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]",
274
- <%- end -%>
275
- <%- end -%>
276
- "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
277
- ],
278
- "properties": {
279
- "hardwareProfile": {
280
- "vmSize": "[variables('vmSize')]"
281
- },
282
- "osProfile": {
283
- "computername": "[variables('vmName')]",
284
- <%- unless custom_data.empty? -%>
285
- "customData": "[parameters('customData')]",
286
- <%- end -%>
287
- "adminUsername": "[parameters('adminUsername')]",
288
- "adminPassword": "[parameters('adminPassword')]"
289
- },
290
- "storageProfile": {
291
- <%- if image_url.empty? and image_id.empty? -%>
292
- "imageReference": {
293
- "publisher": "[parameters('imagePublisher')]",
294
- "offer": "[parameters('imageOffer')]",
295
- "sku": "[parameters('imageSku')]",
296
- "version": "[parameters('imageVersion')]"
297
- },
298
- <%- elsif !image_id.empty? -%>
299
- "imageReference": {
300
- "id": "[parameters('imageId')]"
301
- },
302
- <%- end -%>
303
- <%- if use_managed_disks -%>
304
- "osDisk": {
305
- "name": "osdisk",
306
- <%- unless os_disk_size_gb.to_s.empty? -%>
307
- "diskSizeGB": "[parameters('osDiskSizeGB')]",
308
- <%- end -%>
309
- "createOption": "FromImage"
310
- }
311
- <%- else -%>
312
- "osDisk": {
313
- "name": "osdisk",
314
- <%- if !image_url.empty? -%>
315
- <%- unless os_disk_size_gb.to_s.empty? -%>
316
- "diskSizeGB": "[parameters('osDiskSizeGB')]",
317
- <%- end -%>
318
- "image": {
319
- "uri": "[parameters('imageUrl')]"
320
- },
321
- "osType": "[parameters('osType')]",
322
- <%- end -%>
323
- "vhd": {
324
- <%- if existing_storage_account_blob_url.empty? -%>
325
- "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName')), '2015-06-15').primaryEndpoints.blob, variables('vmStorageAccountContainerName'), '/',variables('OSDiskName'),parameters('osDiskNameSuffix'),'.vhd')]"
326
- <%- else -%>
327
- <%- if existing_storage_account_container.empty? -%>
328
- "uri": "[concat(parameters('existingStorageAccountBlobURL'), '/', variables('vmStorageAccountContainerName'), '/', variables('OSDiskName'),parameters('osDiskNameSuffix'),'.vhd')]"
329
- <%- else -%>
330
- "uri": "[concat(parameters('existingStorageAccountBlobURL'), '/', parameters('existingStorageAccountBlobContainer'), '/', variables('OSDiskName'),parameters('osDiskNameSuffix'),'.vhd')]"
331
- <%- end -%>
332
- <%- end -%>
333
- },
334
- "caching": "ReadWrite",
335
- "createOption": "FromImage"
336
- }
337
- <%- end -%>
338
- <%- unless data_disks_for_vm_json.nil? -%>
339
- ,"dataDisks":
340
- <%= data_disks_for_vm_json %>
341
- <%- end -%>
342
- },
343
- "networkProfile": {
344
- "networkInterfaces": [
345
- {
346
- "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
347
- }
348
- ]
349
- },
350
- "diagnosticsProfile": {
351
- <%- unless use_managed_disks -%>
352
- "bootDiagnostics": {
353
- "enabled": "[parameters('bootDiagnosticsEnabled')]",
354
- <%- if existing_storage_account_blob_url.empty? -%>
355
- "storageUri": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName')), '2015-06-15').primaryEndpoints.blob]"
356
- <%- else -%>
357
- "storageUri": "[parameters('existingStorageAccountBlobURL')]"
358
- <%- end -%>
359
- }
360
- <%- end -%>
361
- }
362
- },
363
- "tags": {
364
- <%= vm_tags unless vm_tags.empty? %>
365
- }
366
- }
367
- ]
368
- }
1
+ {
2
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3
+ "contentVersion": "1.0.0.0",
4
+ "parameters": {
5
+ "location": {
6
+ "type": "string",
7
+ "metadata": {
8
+ "description": "The location where the resources will be created."
9
+ }
10
+ },
11
+ "vmSize": {
12
+ "type": "string",
13
+ "metadata": {
14
+ "description": "The size of the VM to be created"
15
+ }
16
+ },
17
+ "newStorageAccountName": {
18
+ "type": "string",
19
+ "metadata": {
20
+ "description": "Unique DNS Name for the Storage Account where the Virtual Machine's disks will be placed."
21
+ }
22
+ },
23
+ "adminUsername": {
24
+ "type": "string",
25
+ "metadata": {
26
+ "description": "User name for the Virtual Machine."
27
+ }
28
+ },
29
+ "adminPassword": {
30
+ "type": "securestring",
31
+ "metadata": {
32
+ "description": "Password for the Virtual Machine."
33
+ }
34
+ },
35
+ "dnsNameForPublicIP": {
36
+ "type": "string",
37
+ "metadata": {
38
+ "description": "Unique DNS Name for the Public IP used to access the Virtual Machine."
39
+ }
40
+ },
41
+ <%- unless os_disk_size_gb.to_s.empty? -%>
42
+ "osDiskSizeGb": {
43
+ "type": "int",
44
+ "minValue": 1,
45
+ "maxValue": 1023,
46
+ "metadata": {
47
+ "description": "Size of the OS disks in GB."
48
+ }
49
+ },
50
+ <%- end -%>
51
+ <%- unless custom_data.empty? -%>
52
+ "customData": {
53
+ "type": "string",
54
+ "metadata": {
55
+ "description": "Custom Data for the instance (e.g. cloud-init or script) - not compatible with winrm."
56
+ }
57
+ },
58
+ <%- end -%>
59
+ <%- if !existing_storage_account_blob_url.empty? -%>
60
+ "existingStorageAccountBlobURL": {
61
+ "type": "string",
62
+ "metadata": {
63
+ "description": "The URL of the existing storage account (blob) (without container)"
64
+ }
65
+ },
66
+ <%- end -%>
67
+ <%- if !existing_storage_account_container.empty? -%>
68
+ "existingStorageAccountBlobContainer": {
69
+ "type": "string",
70
+ "metadata": {
71
+ "description": "The Container Name for OS Images (blob)"
72
+ }
73
+ },
74
+ <%- end -%>
75
+ <%- if !image_url.empty? -%>
76
+ "imageUrl": {
77
+ "type": "string",
78
+ "metadata": {
79
+ "description": "An URL for a private Image (vhd)"
80
+ }
81
+ },
82
+ "osType": {
83
+ "type": "string",
84
+ "metadata": {
85
+ "description": "An OS Type (linux, windows)"
86
+ }
87
+ },
88
+ <%- elsif !image_id.empty? -%>
89
+ "imageId": {
90
+ "type": "string",
91
+ "metadata": {
92
+ "description": "The id of a managed image"
93
+ }
94
+ },
95
+ <%- else -%>
96
+ "imagePublisher": {
97
+ "type": "string",
98
+ "defaultValue": "Canonical",
99
+ "metadata": {
100
+ "description": "Publisher for the VM, e.g. Canonical, MicrosoftWindowsServer"
101
+ }
102
+ },
103
+ "imageOffer": {
104
+ "type": "string",
105
+ "defaultValue": "UbuntuServer",
106
+ "metadata": {
107
+ "description": "Offer for the VM, e.g. UbuntuServer, WindowsServer."
108
+ }
109
+ },
110
+ "imageSku": {
111
+ "type": "string",
112
+ "defaultValue": "14.04.3-LTS",
113
+ "metadata": {
114
+ "description": "Sku for the VM, e.g. 14.04.3-LTS"
115
+ }
116
+ },
117
+ "imageVersion": {
118
+ "type": "string",
119
+ "defaultValue": "latest",
120
+ "metadata": {
121
+ "description": "Either a date or latest."
122
+ }
123
+ },
124
+ <%- end -%>
125
+ "osDiskNameSuffix": {
126
+ "type": "string",
127
+ "defaultValue": "",
128
+ "metadata": {
129
+ "description": "A disk Name Suffix to make the disk name unique in existing storage accounts."
130
+ }
131
+ },
132
+ "vmName": {
133
+ "type": "string",
134
+ "defaultValue": "vm",
135
+ "metadata": {
136
+ "description": "The vm name created inside of the resource group."
137
+ }
138
+ },
139
+ "storageAccountType": {
140
+ "type": "string",
141
+ "defaultValue": "Standard_LRS",
142
+ "metadata": {
143
+ "description": "The type of storage to use (e.g. Standard_LRS or Premium_LRS)."
144
+ }
145
+ },
146
+ "bootDiagnosticsEnabled": {
147
+ "type": "string",
148
+ "defaultValue": "true",
149
+ "metadata": {
150
+ "description": "Whether to enable (true) or disable (false) boot diagnostics. Default: false."
151
+ }
152
+ }
153
+ },
154
+ "variables": {
155
+ "location": "[parameters('location')]",
156
+ "OSDiskName": "osdisk",
157
+ "nicName": "nic",
158
+ "addressPrefix": "10.0.0.0/16",
159
+ "subnetName": "Subnet",
160
+ "subnetPrefix": "10.0.0.0/24",
161
+ "storageAccountType": "[parameters('storageAccountType')]",
162
+ "publicIPAddressName": "publicip",
163
+ "publicIPAddressType": "Dynamic",
164
+ "vmStorageAccountContainerName": "vhds",
165
+ "vmName": "[parameters('vmName')]",
166
+ "vmSize": "[parameters('vmSize')]",
167
+ "virtualNetworkName": "vnet",
168
+ "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
169
+ "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]"
170
+ },
171
+ "resources": [
172
+ {
173
+ "apiVersion": "2017-05-10",
174
+ "name": "pid-18d63047-6cdf-4f34-beed-62f01fc73fc2",
175
+ "type": "Microsoft.Resources/deployments",
176
+ "properties": {
177
+ "mode": "Incremental",
178
+ "template": {
179
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
180
+ "contentVersion": "1.0.0.0",
181
+ "resources": []
182
+ }
183
+ }
184
+ },
185
+ <%- unless use_managed_disks -%>
186
+ <%- if existing_storage_account_blob_url.empty? -%>
187
+ {
188
+ "type": "Microsoft.Storage/storageAccounts",
189
+ "name": "[parameters('newStorageAccountName')]",
190
+ "apiVersion": "2015-05-01-preview",
191
+ "location": "[variables('location')]",
192
+ "properties": {
193
+ "accountType": "[variables('storageAccountType')]"
194
+ },
195
+ "tags": {
196
+ }
197
+ },
198
+ <%- end -%>
199
+ <%- end -%>
200
+ {
201
+ "apiVersion": "2015-05-01-preview",
202
+ "type": "Microsoft.Network/publicIPAddresses",
203
+ "name": "[variables('publicIPAddressName')]",
204
+ "location": "[variables('location')]",
205
+ "properties": {
206
+ "publicIPAllocationMethod": "[variables('publicIPAddressType')]",
207
+ "dnsSettings": {
208
+ "domainNameLabel": "[parameters('dnsNameForPublicIP')]"
209
+ }
210
+ },
211
+ "tags": {
212
+ }
213
+ },
214
+ {
215
+ "apiVersion": "2015-05-01-preview",
216
+ "type": "Microsoft.Network/virtualNetworks",
217
+ "name": "[variables('virtualNetworkName')]",
218
+ "location": "[variables('location')]",
219
+ "properties": {
220
+ "addressSpace": {
221
+ "addressPrefixes": [
222
+ "[variables('addressPrefix')]"
223
+ ]
224
+ },
225
+ "subnets": [
226
+ {
227
+ "name": "[variables('subnetName')]",
228
+ "properties": {
229
+ "addressPrefix": "[variables('subnetPrefix')]"
230
+ }
231
+ }
232
+ ]
233
+ },
234
+ "tags": {
235
+ }
236
+ },
237
+ {
238
+ "apiVersion": "2015-05-01-preview",
239
+ "type": "Microsoft.Network/networkInterfaces",
240
+ "name": "[variables('nicName')]",
241
+ "location": "[variables('location')]",
242
+ "dependsOn": [
243
+ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]",
244
+ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"
245
+ ],
246
+ "properties": {
247
+ "ipConfigurations": [
248
+ {
249
+ "name": "ipconfig1",
250
+ "properties": {
251
+ "privateIPAllocationMethod": "Dynamic",
252
+ "publicIPAddress": {
253
+ "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
254
+ },
255
+ "subnet": {
256
+ "id": "[variables('subnetRef')]"
257
+ }
258
+ }
259
+ }
260
+ ]
261
+ },
262
+ "tags": {
263
+ }
264
+ },
265
+ {
266
+ "apiVersion": "2017-03-30",
267
+ "type": "Microsoft.Compute/virtualMachines",
268
+ "name": "[variables('vmName')]",
269
+ "location": "[variables('location')]",
270
+ "dependsOn": [
271
+ <%- unless use_managed_disks -%>
272
+ <%- if existing_storage_account_blob_url.empty? -%>
273
+ "[concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName'))]",
274
+ <%- end -%>
275
+ <%- end -%>
276
+ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
277
+ ],
278
+ "properties": {
279
+ "hardwareProfile": {
280
+ "vmSize": "[variables('vmSize')]"
281
+ },
282
+ "osProfile": {
283
+ "computername": "[variables('vmName')]",
284
+ <%- unless custom_data.empty? -%>
285
+ "customData": "[parameters('customData')]",
286
+ <%- end -%>
287
+ "adminUsername": "[parameters('adminUsername')]",
288
+ "adminPassword": "[parameters('adminPassword')]"
289
+ },
290
+ "storageProfile": {
291
+ <%- if image_url.empty? and image_id.empty? -%>
292
+ "imageReference": {
293
+ "publisher": "[parameters('imagePublisher')]",
294
+ "offer": "[parameters('imageOffer')]",
295
+ "sku": "[parameters('imageSku')]",
296
+ "version": "[parameters('imageVersion')]"
297
+ },
298
+ <%- elsif !image_id.empty? -%>
299
+ "imageReference": {
300
+ "id": "[parameters('imageId')]"
301
+ },
302
+ <%- end -%>
303
+ <%- if use_managed_disks -%>
304
+ "osDisk": {
305
+ "name": "osdisk",
306
+ <%- unless os_disk_size_gb.to_s.empty? -%>
307
+ "diskSizeGB": "[parameters('osDiskSizeGB')]",
308
+ <%- end -%>
309
+ "createOption": "FromImage"
310
+ }
311
+ <%- else -%>
312
+ "osDisk": {
313
+ "name": "osdisk",
314
+ <%- if !image_url.empty? -%>
315
+ <%- unless os_disk_size_gb.to_s.empty? -%>
316
+ "diskSizeGB": "[parameters('osDiskSizeGB')]",
317
+ <%- end -%>
318
+ "image": {
319
+ "uri": "[parameters('imageUrl')]"
320
+ },
321
+ "osType": "[parameters('osType')]",
322
+ <%- end -%>
323
+ "vhd": {
324
+ <%- if existing_storage_account_blob_url.empty? -%>
325
+ "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName')), '2015-06-15').primaryEndpoints.blob, variables('vmStorageAccountContainerName'), '/',variables('OSDiskName'),parameters('osDiskNameSuffix'),'.vhd')]"
326
+ <%- else -%>
327
+ <%- if existing_storage_account_container.empty? -%>
328
+ "uri": "[concat(parameters('existingStorageAccountBlobURL'), '/', variables('vmStorageAccountContainerName'), '/', variables('OSDiskName'),parameters('osDiskNameSuffix'),'.vhd')]"
329
+ <%- else -%>
330
+ "uri": "[concat(parameters('existingStorageAccountBlobURL'), '/', parameters('existingStorageAccountBlobContainer'), '/', variables('OSDiskName'),parameters('osDiskNameSuffix'),'.vhd')]"
331
+ <%- end -%>
332
+ <%- end -%>
333
+ },
334
+ "caching": "ReadWrite",
335
+ "createOption": "FromImage"
336
+ }
337
+ <%- end -%>
338
+ <%- unless data_disks_for_vm_json.nil? -%>
339
+ ,"dataDisks":
340
+ <%= data_disks_for_vm_json %>
341
+ <%- end -%>
342
+ },
343
+ "networkProfile": {
344
+ "networkInterfaces": [
345
+ {
346
+ "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
347
+ }
348
+ ]
349
+ },
350
+ "diagnosticsProfile": {
351
+ <%- unless use_managed_disks -%>
352
+ "bootDiagnostics": {
353
+ "enabled": "[parameters('bootDiagnosticsEnabled')]",
354
+ <%- if existing_storage_account_blob_url.empty? -%>
355
+ "storageUri": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('newStorageAccountName')), '2015-06-15').primaryEndpoints.blob]"
356
+ <%- else -%>
357
+ "storageUri": "[parameters('existingStorageAccountBlobURL')]"
358
+ <%- end -%>
359
+ }
360
+ <%- end -%>
361
+ }
362
+ },
363
+ "tags": {
364
+ <%= vm_tags unless vm_tags.empty? %>
365
+ }
366
+ }
367
+ ]
368
+ }