Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
142 lines (141 sloc) 5.18 KB
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"resourcePrefix": {
"type": "string",
"minLength": 3,
"maxLength": 15,
"metadata": {
"description": "Name of the VM."
}
},
"windowsOSVersion": {
"type": "string",
"defaultValue": "2016-Datacenter",
"allowedValues": [
"2008-R2-SP1",
"2012-Datacenter",
"2012-R2-Datacenter",
"2016-Datacenter"
],
"metadata": {
"description": "The Windows version for the VM. This will pick a fully patched image of this given Windows version."
}
},
"vmSize": {
"type": "string",
"defaultValue": "Standard_A1",
"allowedValues": [
"Standard_A1",
"Standard_A2",
"Standard_A1_v2",
"Standard_A2_v2",
"Standard_D1_v2",
"Standard_D2_v2"
],
"metadata": {
"description": "Specifies the pricing/performance. (only a sample set of allowed values is listed)"
}
},
"adminUser": {
"type": "string",
"metadata": {
"description": "The admin user of the VM"
}
},
"adminPassword": {
"type": "securestring",
"metadata": {
"description": "The password of the admin user of the VM"
}
},
"subnetResourceId": {
"type": "string",
"metadata": {
"description": "The Resoruce ID of the vNEt Subnet into which the VM should be placed. "
}
},
"privateIP" : {
"type": "string",
"metadata": {
"description" : "the private IP to place the RDP job box at"
}
},
"templateBaseURL": {
"type": "string",
"defaultValue": "[deployment().properties.templateLink.uri]",
"metadata": {
"description": "The base location for all linked templates."
}
},
"templateSASToken": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "The base location for all linked templates."
}
}
},
"variables": {
"NetworkProviderAPI" : "2015-06-15",
"deploymentAPI" : "2015-01-01",
"publicIPName": "[tolower(concat(parameters('resourcePrefix'), '-rdp'))]",
"vmTemplateURI": "[concat(uri(parameters('templateBaseURL'), 'deploy-vm.json'), parameters('templateSASToken'))]"
},
"resources": [
{
"type": "Microsoft.Network/publicIPAddresses",
"name": "[variables('publicIPName')]",
"apiVersion": "[variables('NetworkProviderAPI')]",
"location": "[resourceGroup().location]",
"properties": {
"publicIPAllocationMethod": "Static",
"dnsSettings": {
"domainNameLabel": "[variables('publicIPName')]"
}
}
},
{
"type": "Microsoft.Resources/deployments",
"name": "[concat(deployment().name, '-vm')]",
"apiVersion": "[variables('deploymentAPI')]",
"dependsOn": [
"[resourceId('Microsoft.Network/publicIPAddresses/', variables('publicIPName'))]"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('vmTemplateURI')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"vmName": { "value": "[concat(parameters('resourcePrefix'), '-rdp')]" },
"vmNamesuffix": { "value": "" },
"windowsOSVersion": { "value": "[parameters('windowsOSVersion')]" },
"vmSize": { "value": "[parameters('vmSize')]" },
"adminUser": { "value": "[parameters('adminUser')]" },
"adminPassword": { "value": "parameters('adminPassword')" },
"ipConfig": {
"value": {
"privateIPAllocationMethod": "Dynamic",
"privateIPAddress": "[parameters('privateIP')]",
"subnet": {
"id": "[parameters('subnetResourceId')]"
},
"publicIPAddress": {
"id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPName'))]"
}
}
}
}
}
}
],
"outputs": {
"jumpboxFQDN" : {
"type" : "string",
"value": "[reference(variables('publicIPName')).dnsSettings.fqdn]"
}
}
}