|
| 1 | +{ |
| 2 | + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", |
| 3 | + "contentVersion": "1.0.0.1", |
| 4 | + "parameters": { |
| 5 | + "storageType": { |
| 6 | + "type": "string", |
| 7 | + "defaultValue": "Premium_LRS", |
| 8 | + "allowedValues": [ |
| 9 | + "Premium_LRS", |
| 10 | + "Standard_LRS" |
| 11 | + ], |
| 12 | + "metadata": { |
| 13 | + "description": "Which type of storage you want to use" |
| 14 | + } |
| 15 | + }, |
| 16 | + "vmName": { |
| 17 | + "type": "string", |
| 18 | + "metadata": { |
| 19 | + "description": "Local name for the VM can be whatever you want" |
| 20 | + } |
| 21 | + }, |
| 22 | + "vmAdminUserName": { |
| 23 | + "type": "string", |
| 24 | + "metadata": { |
| 25 | + "description": "VM admin user name" |
| 26 | + } |
| 27 | + }, |
| 28 | + "vmAdminPassword": { |
| 29 | + "type": "securestring", |
| 30 | + "metadata": { |
| 31 | + "description": "VM admin password. The supplied password must be between 8-123 characters long and must satisfy at least 3 of password complexity requirements from the following: 1) Contains an uppercase character 2) Contains a lowercase character 3) Contains a numeric digit 4) Contains a special character." |
| 32 | + } |
| 33 | + }, |
| 34 | + "vmSize": { |
| 35 | + "type": "string", |
| 36 | + "metadata": { |
| 37 | + "description": "Desired Size of the VM. Any valid option accepted but if you choose premium storage type you must choose a DS class VM size." |
| 38 | + }, |
| 39 | + "defaultValue": "Standard_DS2" |
| 40 | + }, |
| 41 | + "vmVisualStudioVersion": { |
| 42 | + "type": "string", |
| 43 | + "defaultValue": "VS-2015-Ent-VSU2-AzureSDK-29-W10T-N-x64", |
| 44 | + "allowedValues": [ |
| 45 | + "VS-2015-Comm-AzureSDK-2.9-W10T-Win10-N", |
| 46 | + "VS-2015-Comm-AzureSDK-2.9-WS2012R2", |
| 47 | + "VS-2015-Comm-VSU1-AzureSDK-2.8-W10T-N-x64", |
| 48 | + "VS-2015-Comm-VSU2-AzureSDK-29-W10T-N-x64", |
| 49 | + "VS-2015-Comm-VSU2-AzureSDK-29-WS2012R2", |
| 50 | + "VS-2015-Community-AzureSDK-2.7-Cordova-Win8.1-N-x64", |
| 51 | + "VS-2015-Community-AzureSDK-2.7-W10T-Win10-N", |
| 52 | + "VS-2015-Community-AzureSDK-2.7-WS2012R2", |
| 53 | + "VS-2015-Ent-AzureSDK-2.8-Cordova-Win8.1-N-x64", |
| 54 | + "VS-2015-Ent-AzureSDK-29-W10T-Win10-N", |
| 55 | + "VS-2015-Ent-VSU2-AzureSDK-29-W10T-N-x64", |
| 56 | + "VS-2015-Ent-VSU2-AzureSDK-29-WS2012R2", |
| 57 | + "VS-2015-Enterprise-AzureSDK-2.7-Cordova-Win8.1-N-x64", |
| 58 | + "VS-2015-Enterprise-AzureSDK-2.7-W10T-Win10-N", |
| 59 | + "VS-2015-Enterprise-AzureSDK-2.7-WS2012R2", |
| 60 | + "VS-2015-Pro-AzureSDK-2.8-Cordova-Win8.1-N-x64", |
| 61 | + "VS-2015-Professional-AzureSDK-2.7-Cordova-Win8.1-N-x64", |
| 62 | + "VS-2015-Professional-AzureSDK-2.7-W10T-Win10-N" |
| 63 | + ], |
| 64 | + "metadata": { |
| 65 | + "description": "Which version of Visual Studio you would like to deploy" |
| 66 | + } |
| 67 | + }, |
| 68 | + "dnsLabelPrefix": { |
| 69 | + "type": "string", |
| 70 | + "metadata": { |
| 71 | + "description": "DNS Label for the Public IP. Must be lowercase. It should match with the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$ or it will raise an error." |
| 72 | + } |
| 73 | + }, |
| 74 | + "chocoPackages": { |
| 75 | + "type": "string", |
| 76 | + "metadata": { |
| 77 | + "description": "List of Chocolatey packages to install separated by a semi-colon eg. linqpad;sysinternals" |
| 78 | + } |
| 79 | + }, |
| 80 | + "setupChocolateyScriptFileName": { |
| 81 | + "type": "string", |
| 82 | + "defaultValue": "SetupChocolatey.ps1", |
| 83 | + "metadata": { |
| 84 | + "description": "PowerShell script name to execute" |
| 85 | + } |
| 86 | + }, |
| 87 | + "setupChocolatelyScriptLocation": { |
| 88 | + "type": "string", |
| 89 | + "defaultValue": "https://raw.githubusercontent.com/daltskin/ARMChocolatey/master/", |
| 90 | + "metadata": { |
| 91 | + "description": "Public uri location of PowerShell Chocolately setup script" |
| 92 | + } |
| 93 | + } |
| 94 | + }, |
| 95 | + "variables": { |
| 96 | + "storageName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", |
| 97 | + "vnet01Prefix": "10.0.0.0/16", |
| 98 | + "vnet01Subnet1Name": "Subnet-1", |
| 99 | + "vnet01Subnet1Prefix": "10.0.0.0/24", |
| 100 | + "vmImagePublisher": "MicrosoftVisualStudio", |
| 101 | + "vmImageOffer": "VisualStudio", |
| 102 | + "vmOSDiskName": "VMOSDisk", |
| 103 | + "vmVnetID": "[resourceId('Microsoft.Network/virtualNetworks', 'Vnet01')]", |
| 104 | + "vmSubnetRef": "[concat(variables('VMVnetID'), '/subnets/', variables('Vnet01Subnet1Name'))]", |
| 105 | + "vmStorageAccountContainerName": "vhds", |
| 106 | + "vmNicName": "[concat(parameters('VMName'), 'NetworkInterface')]", |
| 107 | + "vmIP01Name": "VMIP01" |
| 108 | + }, |
| 109 | + "resources": [ |
| 110 | + { |
| 111 | + "name": "[variables('storageName')]", |
| 112 | + "type": "Microsoft.Storage/storageAccounts", |
| 113 | + "location": "[resourceGroup().location]", |
| 114 | + "apiVersion": "2015-06-15", |
| 115 | + "dependsOn": [ ], |
| 116 | + "tags": { |
| 117 | + "displayName": "Storage01" |
| 118 | + }, |
| 119 | + "properties": { |
| 120 | + "accountType": "[parameters('storageType')]" |
| 121 | + } |
| 122 | + }, |
| 123 | + { |
| 124 | + "name": "VNet01", |
| 125 | + "type": "Microsoft.Network/virtualNetworks", |
| 126 | + "location": "[resourceGroup().location]", |
| 127 | + "apiVersion": "2015-06-15", |
| 128 | + "dependsOn": [ ], |
| 129 | + "tags": { |
| 130 | + "displayName": "VNet01" |
| 131 | + }, |
| 132 | + "properties": { |
| 133 | + "addressSpace": { |
| 134 | + "addressPrefixes": [ |
| 135 | + "[variables('vnet01Prefix')]" |
| 136 | + ] |
| 137 | + }, |
| 138 | + "subnets": [ |
| 139 | + { |
| 140 | + "name": "[variables('vnet01Subnet1Name')]", |
| 141 | + "properties": { |
| 142 | + "addressPrefix": "[variables('vnet01Subnet1Prefix')]" |
| 143 | + } |
| 144 | + } |
| 145 | + ] |
| 146 | + } |
| 147 | + }, |
| 148 | + { |
| 149 | + "name": "[variables('vmNicName')]", |
| 150 | + "type": "Microsoft.Network/networkInterfaces", |
| 151 | + "location": "[resourceGroup().location]", |
| 152 | + "apiVersion": "2015-06-15", |
| 153 | + "dependsOn": [ |
| 154 | + "[concat('Microsoft.Network/virtualNetworks/', 'Vnet01')]", |
| 155 | + "[concat('Microsoft.Network/publicIPAddresses/', variables('vmIP01Name'))]" |
| 156 | + ], |
| 157 | + "tags": { |
| 158 | + "displayName": "VMNic01" |
| 159 | + }, |
| 160 | + "properties": { |
| 161 | + "ipConfigurations": [ |
| 162 | + { |
| 163 | + "name": "ipconfig1", |
| 164 | + "properties": { |
| 165 | + "privateIPAllocationMethod": "Dynamic", |
| 166 | + "subnet": { |
| 167 | + "id": "[variables('vmSubnetRef')]" |
| 168 | + }, |
| 169 | + "publicIPAddress": { |
| 170 | + "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('vmIP01Name'))]" |
| 171 | + } |
| 172 | + } |
| 173 | + } |
| 174 | + ] |
| 175 | + } |
| 176 | + }, |
| 177 | + { |
| 178 | + "name": "[parameters('vmName')]", |
| 179 | + "type": "Microsoft.Compute/virtualMachines", |
| 180 | + "location": "[resourceGroup().location]", |
| 181 | + "apiVersion": "2015-06-15", |
| 182 | + "dependsOn": [ |
| 183 | + "[concat('Microsoft.Storage/storageAccounts/', variables('storageName'))]", |
| 184 | + "[concat('Microsoft.Network/networkInterfaces/', variables('vmNicName'))]" |
| 185 | + ], |
| 186 | + "tags": { |
| 187 | + "displayName": "VM01" |
| 188 | + }, |
| 189 | + "properties": { |
| 190 | + "hardwareProfile": { |
| 191 | + "vmSize": "[parameters('vmSize')]" |
| 192 | + }, |
| 193 | + "osProfile": { |
| 194 | + "computername": "[parameters('vmName')]", |
| 195 | + "adminUsername": "[parameters('vmAdminUsername')]", |
| 196 | + "adminPassword": "[parameters('vmAdminPassword')]" |
| 197 | + }, |
| 198 | + "storageProfile": { |
| 199 | + "imageReference": { |
| 200 | + "publisher": "[variables('vmImagePublisher')]", |
| 201 | + "offer": "[variables('vmImageOffer')]", |
| 202 | + "sku": "[parameters('vmVisualStudioVersion')]", |
| 203 | + "version": "latest" |
| 204 | + }, |
| 205 | + "osDisk": { |
| 206 | + "name": "VMOSDisk", |
| 207 | + "vhd": { |
| 208 | + "uri": "[concat('http://', variables('storageName'), '.blob.core.windows.net/', variables('vmStorageAccountContainerName'), '/', variables('vmOSDiskName'), '.vhd')]" |
| 209 | + }, |
| 210 | + "caching": "ReadWrite", |
| 211 | + "createOption": "FromImage" |
| 212 | + } |
| 213 | + }, |
| 214 | + "networkProfile": { |
| 215 | + "networkInterfaces": [ |
| 216 | + { |
| 217 | + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNicName'))]" |
| 218 | + } |
| 219 | + ] |
| 220 | + } |
| 221 | + }, |
| 222 | + "resources": [ |
| 223 | + { |
| 224 | + "name": "SetupChocolatey", |
| 225 | + "type": "extensions", |
| 226 | + "location": "[resourceGroup().location]", |
| 227 | + "apiVersion": "2015-06-15", |
| 228 | + "dependsOn": [ |
| 229 | + "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" |
| 230 | + ], |
| 231 | + "tags": { |
| 232 | + "displayName": "SetupChocolatey" |
| 233 | + }, |
| 234 | + "properties": { |
| 235 | + "publisher": "Microsoft.Compute", |
| 236 | + "type": "CustomScriptExtension", |
| 237 | + "typeHandlerVersion": "1.4", |
| 238 | + "autoUpgradeMinorVersion": true, |
| 239 | + "settings": { |
| 240 | + "fileUris": [ |
| 241 | + "[concat(parameters('setupChocolatelyScriptLocation'),parameters('setupChocolateyScriptFileName'))]" |
| 242 | + ], |
| 243 | + "commandToExecute": "[concat('powershell -ExecutionPolicy bypass -File ',parameters('setupChocolateyScriptFileName'),' -chocoPackages ',parameters('chocoPackages'))]" |
| 244 | + } |
| 245 | + } |
| 246 | + } |
| 247 | + ] |
| 248 | + }, |
| 249 | + { |
| 250 | + "name": "[variables('vmIP01Name')]", |
| 251 | + "type": "Microsoft.Network/publicIPAddresses", |
| 252 | + "location": "[resourceGroup().location]", |
| 253 | + "apiVersion": "2015-06-15", |
| 254 | + "dependsOn": [ ], |
| 255 | + "tags": { |
| 256 | + "displayName": "VMIP01" |
| 257 | + }, |
| 258 | + "properties": { |
| 259 | + "publicIPAllocationMethod": "Dynamic", |
| 260 | + "dnsSettings": { |
| 261 | + "domainNameLabel": "[parameters('dnsLabelPrefix')]" |
| 262 | + } |
| 263 | + } |
| 264 | + } |
| 265 | + ], |
| 266 | + "outputs": { } |
| 267 | + } |
| 268 | + |
0 commit comments