AX2012ARMTemplates/DiskSelectionTemplate.json

527 строки
20 KiB
JSON

{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"diskCaching": {
"type": "string",
"allowedValues": [
"None",
"ReadOnly",
"ReadWrite"
],
"metadata": {
"description": "Caching type for the data disks"
}
},
"diskNamePrefix": {
"type": "string",
"metadata": {
"description": "The disk name prefix."
}
},
"diskSizeGB": {
"type": "int",
"minValue": 1,
"maxValue": 1023,
"metadata": {
"description": "Size of the data disks"
}
},
"diskStorageAccountName": {
"type": "string",
"metadata": {
"description": "Name of the storage account where the data disks are stored"
}
},
"numDataDisks": {
"type": "string",
"allowedValues": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"32"
],
"metadata": {
"description": "This parameter allows the user to select the number of disks they want"
}
},
"vhdStorageContainerName": {
"type": "string",
"metadata": {
"description": "The vhd storage container name."
}
}
},
"variables": {
"disksArray": {
"1": "[variables('dataDisks')['1']]",
"2": "[concat(variables('dataDisks')['1'], variables('dataDisks')['2'])]",
"3": "[concat(variables('dataDisks')['1'], variables('dataDisks')['2'], variables('dataDisks')['3'])]",
"4": "[variables('diskDeltas')['4delta']]",
"5": "[concat(variables('diskDeltas')['4delta'], variables('dataDisks')['5'])]",
"6": "[concat(variables('diskDeltas')['4delta'], variables('dataDisks')['5'], variables('dataDisks')['6'])]",
"7": "[concat(variables('diskDeltas')['4delta'], variables('dataDisks')['5'], variables('dataDisks')['6'], variables('dataDisks')['7'])]",
"8": "[concat(variables('diskDeltas')['4delta'], variables('diskDeltas')['8delta'])]",
"9": "[concat(variables('diskDeltas')['4delta'], variables('diskDeltas')['8delta'], variables('dataDisks')['9'])]",
"10": "[concat(variables('diskDeltas')['4delta'], variables('diskDeltas')['8delta'], variables('dataDisks')['9'], variables('dataDisks')['10'])]",
"11": "[concat(variables('diskDeltas')['4delta'], variables('diskDeltas')['8delta'], variables('dataDisks')['9'], variables('dataDisks')['10'], variables('dataDisks')['11'])]",
"12": "[concat(variables('diskDeltas')['4delta'], variables('diskDeltas')['8delta'], variables('diskDeltas')['12delta'])]",
"13": "[concat(variables('diskDeltas')['4delta'], variables('diskDeltas')['8delta'], variables('diskDeltas')['12delta'], variables('dataDisks')['13'])]",
"14": "[concat(variables('diskDeltas')['4delta'], variables('diskDeltas')['8delta'], variables('diskDeltas')['12delta'], variables('dataDisks')['13'], variables('dataDisks')['14'])]",
"15": "[concat(variables('diskDeltas')['4delta'], variables('diskDeltas')['8delta'], variables('diskDeltas')['12delta'], variables('dataDisks')['13'], variables('dataDisks')['14'], variables('dataDisks')['15'])]",
"16": "[concat(variables('diskDeltas')['4delta'], variables('diskDeltas')['8delta'], variables('diskDeltas')['12delta'], variables('diskDeltas')['16delta'])]",
"32": "[concat(variables('diskDeltas')['4delta'], variables('diskDeltas')['8delta'], variables('diskDeltas')['12delta'], variables('diskDeltas')['16delta'], variables('diskDeltas')['32delta'])]"
},
"dataDisks": {
"1": [
{
"name": "datadisk1",
"lun": 0,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-1.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"2": [
{
"name": "datadisk2",
"lun": 1,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-2.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"3": [
{
"name": "datadisk3",
"lun": 2,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-3.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"4": [
{
"name": "datadisk4",
"lun": 3,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-4.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"5": [
{
"name": "datadisk5",
"lun": 4,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-5.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"6": [
{
"name": "datadisk6",
"lun": 5,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-6.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"7": [
{
"name": "datadisk7",
"lun": 6,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-7.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"8": [
{
"name": "datadisk8",
"lun": 7,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-8.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"9": [
{
"name": "datadisk9",
"lun": 8,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-9.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"10": [
{
"name": "datadisk10",
"lun": 9,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-10.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"11": [
{
"name": "datadisk11",
"lun": 10,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-11.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"12": [
{
"name": "datadisk12",
"lun": 11,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-12.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"13": [
{
"name": "datadisk13",
"lun": 12,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-13.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"14": [
{
"name": "datadisk14",
"lun": 13,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-14.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"15": [
{
"name": "datadisk15",
"lun": 14,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-15.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"16": [
{
"name": "datadisk16",
"lun": 15,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-16.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"17": [
{
"name": "datadisk17",
"lun": 16,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-17.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"18": [
{
"name": "datadisk18",
"lun": 17,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-18.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"19": [
{
"name": "datadisk19",
"lun": 18,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-19.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"20": [
{
"name": "datadisk20",
"lun": 19,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-20.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"21": [
{
"name": "datadisk21",
"lun": 20,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-21.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"22": [
{
"name": "datadisk22",
"lun": 21,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-22.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"23": [
{
"name": "datadisk23",
"lun": 22,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-23.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"24": [
{
"name": "datadisk24",
"lun": 23,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-24.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"25": [
{
"name": "datadisk25",
"lun": 24,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-25.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"26": [
{
"name": "datadisk26",
"lun": 25,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-26.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"27": [
{
"name": "datadisk27",
"lun": 26,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-27.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"28": [
{
"name": "datadisk28",
"lun": 27,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-28.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"29": [
{
"name": "datadisk29",
"lun": 28,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-29.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"30": [
{
"name": "datadisk30",
"lun": 29,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-30.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"31": [
{
"name": "datadisk31",
"lun": 30,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/', parameters('vhdStorageContainerName'), '/', parameters('diskNamePrefix'), '-31.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
],
"32": [
{
"name": "datadisk32",
"lun": 31,
"vhd": {
"uri": "[concat('http://', parameters('diskStorageAccountName'),'.blob.core.windows.net/vhds/', 'datadisk32.vhd')]"
},
"createOption": "Empty",
"caching": "[parameters('diskCaching')]",
"diskSizeGB": "[parameters('diskSizeGB')]"
}
]
},
// "The delta arrays below build the difference from 0 to 4, 4 to 8, 8 to 12 disks and so on",
"diskDeltas": {
"4delta": [
"[variables('dataDisks')['1'][0]]",
"[variables('dataDisks')['2'][0]]",
"[variables('dataDisks')['3'][0]]",
"[variables('dataDisks')['4'][0]]"
],
"8delta": [
"[variables('dataDisks')['5'][0]]",
"[variables('dataDisks')['6'][0]]",
"[variables('dataDisks')['7'][0]]",
"[variables('dataDisks')['8'][0]]"
],
"12delta": [
"[variables('dataDisks')['9'][0]]",
"[variables('dataDisks')['10'][0]]",
"[variables('dataDisks')['11'][0]]",
"[variables('dataDisks')['12'][0]]"
],
"16delta": [
"[variables('dataDisks')['13'][0]]",
"[variables('dataDisks')['14'][0]]",
"[variables('dataDisks')['15'][0]]",
"[variables('dataDisks')['16'][0]]"
],
"32delta": [
"[variables('dataDisks')['17'][0]]",
"[variables('dataDisks')['18'][0]]",
"[variables('dataDisks')['19'][0]]",
"[variables('dataDisks')['20'][0]]",
"[variables('dataDisks')['21'][0]]",
"[variables('dataDisks')['22'][0]]",
"[variables('dataDisks')['23'][0]]",
"[variables('dataDisks')['24'][0]]",
"[variables('dataDisks')['25'][0]]",
"[variables('dataDisks')['26'][0]]",
"[variables('dataDisks')['27'][0]]",
"[variables('dataDisks')['28'][0]]",
"[variables('dataDisks')['29'][0]]",
"[variables('dataDisks')['30'][0]]",
"[variables('dataDisks')['31'][0]]",
"[variables('dataDisks')['32'][0]]"
]
}
},
"resources": [ ],
"outputs": {
"dataDiskArray": {
"type": "array",
"value": "[variables('disksArray')[parameters('numDataDisks')]]"
}
}
}