-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathosDisk.json
100 lines (100 loc) · 2.73 KB
/
osDisk.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
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "2017.09.01.0",
"parameters": {
"name": {
"type": "string",
"metadata": {
"description": "Specifies the disk name. This element can be used to overwrite the name of the disk in a virtual machine image."
}
},
"Uri": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "Specifies the vhd uri."
}
},
"caching": {
"type": "string",
"allowedValues": [
"",
"None",
"ReadOnly",
"ReadWrite"
],
"defaultValue": "ReadWrite",
"metadata": {
"description": "Specifies the caching requirements. Note that the OS disk will always use read caching even if the setting is configured to None."
}
},
"createOption": {
"type": "string",
"defaultValue": "",
"allowedValues": [
"",
"Attach",
"FromImage"
],
"metadata": {
"description": "Specifies how the virtual machine should be created."
}
},
"diskSizeGB": {
"type": "int",
"defaultValue": 0,
"maxValue": 1023,
"metadata": {
"description": "Specifies the resized size of the OS Disk. Allows you to resize an existing OS disk size. "
}
},
"osType": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. "
}
},
"encryptionSettings": {
"type": "object",
"defaultValue": { },
"metadata": {
"description": "Specifies the encryption settings for the OS Disk."
}
},
"ManagedDiskId": {
"type": "string",
"defaultValue": ""
}
},
"variables": {
"comments": {
"definition": "https://docs.microsoft.com/en-us/rest/api/compute/virtualmachines/virtualmachines-create-or-update#osdisk"
},
"osDiskArray": [
{
"name": "[parameters('name')]",
"caching": "[parameters('caching')]",
"createOption": "[parameters('createOption')]",
"vhd": {
"uri": "[parameters('Uri')]"
},
"diskSizeGB": "[parameters('diskSizeGB')]"
},
{
"name": "[parameters('name')]",
"caching": "[parameters('caching')]",
"createOption": "[parameters('createOption')]"
}
],
"osDisk": "[if(not(empty(parameters('Uri'))),variables('osDiskArray')[0],variables('osDiskArray')[1])]"
},
"resources": [
],
"outputs": {
"osDisk": {
"type": "object",
"value": "[variables('osDisk')]"
}
}
}