Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "parameters": {
- "location": {
- "type": "string"
- },
- "networkInterfaceName": {
- "type": "string"
- },
- "subnetName": {
- "type": "string"
- },
- "virtualNetworkId": {
- "type": "string"
- },
- "virtualMachineName": {
- "type": "string"
- },
- "virtualMachineRG": {
- "type": "string"
- },
- "osDiskType": {
- "type": "string"
- },
- "virtualMachineSize": {
- "type": "string"
- },
- "adminUsername": {
- "type": "string"
- },
- "adminPassword": {
- "type": "secureString"
- },
- "diagnosticsStorageAccountName": {
- "type": "string"
- },
- "diagnosticsStorageAccountId": {
- "type": "string"
- }
- },
- "variables": {
- "vnetId": "[parameters('virtualNetworkId')]",
- "subnetRef": "[concat(variables('vnetId'), '/subnets/', parameters('subnetName'))]"
- },
- "resources": [
- {
- "name": "[parameters('networkInterfaceName')]",
- "type": "Microsoft.Network/networkInterfaces",
- "apiVersion": "2018-10-01",
- "location": "[parameters('location')]",
- "dependsOn": [],
- "properties": {
- "ipConfigurations": [
- {
- "name": "ipconfig1",
- "properties": {
- "subnet": {
- "id": "[variables('subnetRef')]"
- },
- "privateIPAllocationMethod": "Dynamic"
- }
- }
- ]
- }
- },
- {
- "name": "[parameters('virtualMachineName')]",
- "type": "Microsoft.Compute/virtualMachines",
- "apiVersion": "2018-10-01",
- "location": "[parameters('location')]",
- "dependsOn": [
- "[concat('Microsoft.Network/networkInterfaces/', parameters('networkInterfaceName'))]"
- ],
- "properties": {
- "hardwareProfile": {
- "vmSize": "[parameters('virtualMachineSize')]"
- },
- "storageProfile": {
- "osDisk": {
- "createOption": "fromImage",
- "managedDisk": {
- "storageAccountType": "[parameters('osDiskType')]"
- }
- },
- "imageReference": {
- "publisher": "MicrosoftWindowsDesktop",
- "offer": "office-365",
- "sku": "19h2-evd-o365pp",
- "version": "latest"
- }
- },
- "networkProfile": {
- "networkInterfaces": [
- {
- "id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaceName'))]"
- }
- ]
- },
- "osProfile": {
- "computerName": "[parameters('virtualMachineName')]",
- "adminUsername": "[parameters('adminUsername')]",
- "adminPassword": "[parameters('adminPassword')]",
- "windowsConfiguration": {
- "enableAutomaticUpdates": true,
- "provisionVmAgent": true
- }
- },
- "licenseType": "Windows_Client",
- "diagnosticsProfile": {
- "bootDiagnostics": {
- "enabled": true,
- "storageUri": "[concat('https://', parameters('diagnosticsStorageAccountName'), '.blob.core.windows.net/')]"
- }
- }
- }
- }
- ],
- "outputs": {
- "adminUsername": {
- "type": "string",
- "value": "[parameters('adminUsername')]"
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment