2015-11-10 01:55:03 +03:00
|
|
|
|
{
|
2016-04-26 03:03:30 +03:00
|
|
|
|
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
|
|
|
|
"contentVersion": "1.0.0.0",
|
|
|
|
|
"parameters": {
|
|
|
|
|
"windowsImagePublisher": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"metadata": {
|
|
|
|
|
"description": "The Publisher of Windows Image"
|
|
|
|
|
},
|
|
|
|
|
"defaultValue": "MicrosoftWindowsServer"
|
|
|
|
|
},
|
|
|
|
|
"windowsImageOffer": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"metadata": {
|
|
|
|
|
"description": "The offer of Windows Image"
|
|
|
|
|
},
|
|
|
|
|
"defaultValue": "WindowsServer"
|
|
|
|
|
},
|
|
|
|
|
"windowsImageSKU": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"metadata": {
|
|
|
|
|
"description": "The SKU Name of Windows Image"
|
|
|
|
|
},
|
2017-06-29 01:47:27 +03:00
|
|
|
|
"defaultValue": "2016-Datacenter"
|
2016-04-26 03:03:30 +03:00
|
|
|
|
},
|
|
|
|
|
"windowsImageVersion": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"metadata": {
|
|
|
|
|
"description": "The Version of Windows Image"
|
|
|
|
|
},
|
|
|
|
|
"defaultValue": "latest"
|
|
|
|
|
},
|
|
|
|
|
"sqlDiskSize": {
|
|
|
|
|
"type": "int",
|
|
|
|
|
"metadata": {
|
|
|
|
|
"description": "The Size of SQL VM data disk. Default 2 GB"
|
|
|
|
|
},
|
|
|
|
|
"defaultValue": 2
|
|
|
|
|
},
|
|
|
|
|
"vmName": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"metadata": {
|
|
|
|
|
"description": "The VM Name"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"storageAccount": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"metadata": {
|
|
|
|
|
"description": "The Storage Account Name"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"storageAccountType": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"metadata": {
|
|
|
|
|
"description": "The type of the Storage Account created"
|
2017-02-23 21:56:09 +03:00
|
|
|
|
},
|
2017-06-09 00:43:51 +03:00
|
|
|
|
"defaultValue": "Standard_LRS"
|
2016-04-26 03:03:30 +03:00
|
|
|
|
},
|
|
|
|
|
"adminUsername": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"metadata": {
|
|
|
|
|
"description": "The name of the Administrator of the new VMs and Domain"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"adminPassword": {
|
|
|
|
|
"type": "securestring",
|
|
|
|
|
"metadata": {
|
|
|
|
|
"description": "The password for the Administrator account of the new VMs and Domain"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"vmSize": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"metadata": {
|
|
|
|
|
"description": "The size of the AD VMs Created"
|
2017-02-23 21:56:09 +03:00
|
|
|
|
},
|
|
|
|
|
"defaultValue": "Standard_A3"
|
2016-04-26 03:03:30 +03:00
|
|
|
|
},
|
|
|
|
|
"subnetResourceId": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"metadata": {
|
|
|
|
|
"description": "the resource id to the subnet"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"sqlNicName": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"metadata": {
|
|
|
|
|
"description": "Name of the Nic attached to the SQL VM"
|
|
|
|
|
}
|
|
|
|
|
}
|
2015-11-10 01:55:03 +03:00
|
|
|
|
},
|
2016-04-26 03:03:30 +03:00
|
|
|
|
"variables": {
|
|
|
|
|
"location": "[resourceGroup().location]",
|
|
|
|
|
"vmContainerName": "vhds"
|
2015-11-10 01:55:03 +03:00
|
|
|
|
|
|
|
|
|
},
|
2016-04-26 03:03:30 +03:00
|
|
|
|
"resources": [
|
|
|
|
|
{
|
|
|
|
|
"name": "[parameters('storageAccount')]",
|
|
|
|
|
"type": "Microsoft.Storage/storageAccounts",
|
|
|
|
|
"location": "[variables('location')]",
|
2016-09-27 22:05:37 +03:00
|
|
|
|
"apiVersion": "2015-06-15",
|
2016-04-26 03:03:30 +03:00
|
|
|
|
"properties": {
|
|
|
|
|
"accountType": "[parameters('storageAccountType')]"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "[parameters('sqlNicName')]",
|
|
|
|
|
"type": "Microsoft.Network/networkInterfaces",
|
|
|
|
|
"location": "[variables('location')]",
|
2016-09-27 22:05:37 +03:00
|
|
|
|
"apiVersion": "2015-05-01-preview",
|
2016-04-26 03:03:30 +03:00
|
|
|
|
"properties": {
|
|
|
|
|
"ipConfigurations": [
|
|
|
|
|
{
|
|
|
|
|
"name": "ipconfig1",
|
|
|
|
|
"properties": {
|
|
|
|
|
"privateIPAllocationMethod": "Dynamic",
|
|
|
|
|
"subnet": {
|
|
|
|
|
"id": "[parameters('subnetResourceId')]"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "[parameters('vmName')]",
|
|
|
|
|
"type": "Microsoft.Compute/virtualMachines",
|
|
|
|
|
"location": "[variables('location')]",
|
2016-09-27 22:05:37 +03:00
|
|
|
|
"apiVersion": "2015-06-15",
|
2016-04-26 03:03:30 +03:00
|
|
|
|
"dependsOn": [
|
|
|
|
|
"[resourceId('Microsoft.Storage/storageAccounts',parameters('storageAccount'))]",
|
|
|
|
|
"[resourceId('Microsoft.Network/networkInterfaces',parameters('sqlNicName'))]"
|
|
|
|
|
],
|
|
|
|
|
"properties": {
|
|
|
|
|
"hardwareProfile": {
|
|
|
|
|
"vmSize": "[parameters('vmSize')]"
|
|
|
|
|
},
|
|
|
|
|
"osProfile": {
|
|
|
|
|
"computerName": "[parameters('vmName')]",
|
|
|
|
|
"adminUsername": "[parameters('adminUsername')]",
|
|
|
|
|
"adminPassword": "[parameters('adminPassword')]"
|
|
|
|
|
},
|
|
|
|
|
"storageProfile": {
|
|
|
|
|
"imageReference": {
|
|
|
|
|
"publisher": "[parameters('windowsImagePublisher')]",
|
|
|
|
|
"offer": "[parameters('windowsImageOffer')]",
|
|
|
|
|
"sku": "[parameters('windowsImageSKU')]",
|
|
|
|
|
"version": "[parameters('windowsImageVersion')]"
|
|
|
|
|
},
|
|
|
|
|
"osDisk": {
|
|
|
|
|
"name": "osdisk",
|
|
|
|
|
"vhd": {
|
|
|
|
|
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', parameters('storageAccount')),providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob, variables('vmContainerName'),'/', parameters('vmName'), '0','-osdisk.vhd')]"
|
|
|
|
|
},
|
|
|
|
|
"caching": "ReadWrite",
|
|
|
|
|
"createOption": "FromImage"
|
|
|
|
|
},
|
|
|
|
|
"dataDisks": [
|
|
|
|
|
{
|
|
|
|
|
"vhd": {
|
|
|
|
|
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', parameters('storageAccount')),providers('Microsoft.Storage','storageAccounts').apiVersions[0]).primaryEndpoints.blob, variables('vmContainerName'),'/',parameters('vmName'),'0','-data-1.vhd')]"
|
|
|
|
|
},
|
|
|
|
|
"name": "[concat(parameters('vmName'), '0','data-1.vhd')]",
|
|
|
|
|
"caching": "None",
|
2016-09-27 22:05:37 +03:00
|
|
|
|
"createOption": "Empty",
|
2016-04-26 03:03:30 +03:00
|
|
|
|
"diskSizeGB": "[parameters('sqlDiskSize')]",
|
|
|
|
|
"lun": 0
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"vhd": {
|
|
|
|
|
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', parameters('storageAccount')),providers('Microsoft.Storage','storageAccounts').apiVersions[0]).primaryEndpoints.blob,variables('vmContainerName'),'/', parameters('vmName'), '0','log-1.vhd')]"
|
|
|
|
|
},
|
|
|
|
|
"name": "[concat(parameters('vmName'), '0','log-1.vhd')]",
|
|
|
|
|
"caching": "None",
|
2016-09-27 22:05:37 +03:00
|
|
|
|
"createOption": "Empty",
|
2016-04-26 03:03:30 +03:00
|
|
|
|
"diskSizeGB": "[parameters('sqlDiskSize')]",
|
|
|
|
|
"lun": 1
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"networkProfile": {
|
|
|
|
|
"networkInterfaces": [
|
|
|
|
|
{
|
|
|
|
|
"id": "[resourceId('Microsoft.Network/networkInterfaces',parameters('sqlNicName'))]"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"outputs": { }
|
2015-11-10 01:55:03 +03:00
|
|
|
|
}
|