Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
197 lines (197 sloc) 5.91 KB
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"adminUsername": {
"type" : "string",
"metadata" : {
"description" : "Secret URI for default Windows Admin account"
}
},
"adminPassword": {
"type" : "securestring",
"metadata" : {
"description" : "Secret URI for default Windows Admin password"
}
},
"windowsOSVersion": {
"type": "string",
"defaultValue": "rs5-pro",
"allowedValues": [
"rs5-pro"
],
"metadata": {
"description": "The Windows version for the VM. This will pick a fully patched image of this given Windows version. Allowed values: rs5-pro."
}
},
"SubnetName": {
"type": "string",
"defaultValue": "local",
"allowedValues": [
"spoke",
"local"
],
"metadata": {
"description": "Authorized subnet to be used for virtual machine deployment in Virtual Network. Allowed values : subnet-for-iaas."
}
},
"vmNamePrefix" : {
"type": "string",
"metadata": {
"description": "Virtual machine name to be deployed"
}
},
"vmSize" : {
"type" : "string",
"defaultValue": "Standard_A2_v2",
"allowedValues": [
"Standard_D4_v3",
"Standard_D8_v3",
"Standard_A2_v2",
"Standard_D2_v3"
],
"metadata": {
"description": "Virtual machine size to be deployed (limited to a VM list). Allowed values : Standard_A2_v2, Standard_D4_v3, Standard_D8_v3, Standard_A2_v2, Standard_D2_v3"
}
},
"DiskType": {
"type" : "string",
"defaultValue": "Standard_LRS",
"allowedValues": [
"Standard_LRS",
"Premium_LRS"
],
"metadata": {
"description": "Virtual machine disk type (SATA/SSD). Allowed values : Standard_LRS, Premium_LRS"
}
},
"Expiration": {
"type": "string",
"metadata": {
"description": "Tag to be used to set an expiration date on the resource."
}
}
},
"variables": {
"imagePublisher": "MicrosoftWindowsDesktop",
"imageOffer": "Windows-10",
"nicName": "[concat(Parameters('vmNamePrefix'),'_NIC1')]",
"ipconfig1_nic1": "[concat(Variables('nicName'),'_IP1')]",
"DataDisk1Size": 64,
"OSDiskName": "[concat(Parameters('vmNamePrefix'),'_OSDISK')]",
"DataDisk1Name": "[concat(Parameters('vmNamePrefix'),'_DATADISK1')]",
"VNETResourfeGroupName": "Spoke01Network",
"virtualNetworkName": "Spoke01Network",
"vnetID": "[resourceId(variables('VNETResourfeGroupName'), 'Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]",
"subnetRef": "[concat(variables('vnetID'),'/subnets/',parameters('subnetName'))]",
"DataDiskCachingPolicy": "ReadWrite",
"ServiceType": "Bastion"
},
"resources": [
{
"apiVersion": "2017-03-30",
"type": "Microsoft.Compute/disks",
"name": "[variables('DataDisk1Name')]",
"location": "[resourceGroup().location]",
"tags": {
"Service": "[Variables('ServiceType')]",
"Expiration": "[parameters('Expiration')]"
},
"sku": {
"name": "[parameters('DiskType')]"
},
"properties": {
"creationData": {
"createOption": "Empty"
},
"diskSizeGB": "[variables('DataDisk1Size')]"
}
},
{
"apiVersion": "2016-09-01",
"type": "Microsoft.Network/networkInterfaces",
"name": "[variables('nicName')]",
"location": "[resourceGroup().location]",
"tags": {
"Service": "[Variables('ServiceType')]",
"Expiration": "[parameters('Expiration')]"
},
"properties": {
"ipConfigurations": [
{
"name": "[variables('ipconfig1_nic1')]",
"properties": {
"privateIPAllocationMethod": "Dynamic",
"subnet": {
"id": "[Variables('subnetRef')]"
}
}
}
]
}
},
{
"apiVersion": "2017-03-30",
"type": "Microsoft.Compute/virtualMachines",
"name": "[parameters('vmNamePrefix')]",
"location": "[resourceGroup().location]",
"tags": {
"Service": "[Variables('ServiceType')]",
"Expiration": "[parameters('Expiration')]"
},
"dependsOn": [
"[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]",
"[resourceId('Microsoft.Compute/disks/', variables('DataDisk1Name'))]"
],
"properties": {
"hardwareProfile": {
"vmSize": "[parameters('vmSize')]"
},
"osProfile": {
"computerName": "[parameters('vmNamePrefix')]",
"adminUsername": "[parameters('adminUsername')]",
"adminPassword": "[parameters('adminPassword')]",
"windowsConfiguration": {
"provisionVmAgent": "true"
}
},
"storageProfile": {
"imageReference": {
"publisher": "[variables('imagePublisher')]",
"offer": "[variables('imageOffer')]",
"sku": "[parameters('windowsOSVersion')]",
"version": "latest"
},
"dataDisks": [
{
"lun": 0,
"name": "[variables('DataDisk1Name')]",
"createOption": "Attach",
"caching": "[variables('DataDiskCachingPolicy')]",
"managedDisk": {
"id": "[resourceId('Microsoft.Compute/disks/', variables('DataDisk1Name'))]"
}
}
],
"osDisk": {
"createOption": "FromImage",
"name": "[Variables('OSDiskName')]"
}
},
"networkProfile": {
"networkInterfaces": [
{
"id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
}
]
}
}
}
],
"outputs": {
"networkInterface": {
"type": "string",
"value": "[reference(concat(variables('nicName'))).ipConfigurations[0].properties.privateIPAddress]"
}
}
}
You can’t perform that action at this time.