Created
July 31, 2017 11:32
-
-
Save Regenhardt/07c57afb70a5743f14489a3ad44736aa to your computer and use it in GitHub Desktop.
Azure thin client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"location": { | |
"type": "string" | |
}, | |
"virtualMachineName": { | |
"type": "string" | |
}, | |
"virtualMachineSize": { | |
"type": "string" | |
}, | |
"adminUsername": { | |
"type": "string" | |
}, | |
"virtualNetworkName": { | |
"type": "string" | |
}, | |
"networkInterfaceName": { | |
"type": "string" | |
}, | |
"networkSecurityGroupName": { | |
"type": "string" | |
}, | |
"adminPassword": { | |
"type": "securestring" | |
}, | |
"storageAccountName": { | |
"type": "string" | |
}, | |
"storageAccountType": { | |
"type": "string" | |
}, | |
"addressPrefix": { | |
"type": "string" | |
}, | |
"subnetName": { | |
"type": "string" | |
}, | |
"subnetPrefix": { | |
"type": "string" | |
}, | |
"publicIpAddressName": { | |
"type": "string" | |
}, | |
"publicIpAddressType": { | |
"type": "string" | |
} | |
}, | |
"variables": { | |
"vnetId": "[resourceId('Client','Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", | |
"subnetRef": "[concat(variables('vnetId'), '/subnets/', parameters('subnetName'))]" | |
}, | |
"resources": [ | |
{ | |
"name": "[parameters('virtualMachineName')]", | |
"type": "Microsoft.Compute/virtualMachines", | |
"apiVersion": "2016-04-30-preview", | |
"location": "[parameters('location')]", | |
"dependsOn": [ | |
"[concat('Microsoft.Network/networkInterfaces/', parameters('networkInterfaceName'))]", | |
"[concat('Microsoft.Storage/storageAccounts/', parameters('storageAccountName'))]" | |
], | |
"properties": { | |
"osProfile": { | |
"computerName": "[parameters('virtualMachineName')]", | |
"adminUsername": "[parameters('adminUsername')]", | |
"adminPassword": "[parameters('adminPassword')]", | |
"windowsConfiguration": { | |
"provisionVmAgent": "true" | |
} | |
}, | |
"hardwareProfile": { | |
"vmSize": "[parameters('virtualMachineSize')]" | |
}, | |
"storageProfile": { | |
"imageReference": { | |
"publisher": "MicrosoftVisualStudio", | |
"offer": "Windows", | |
"sku": "Windows-10-N-x64", | |
"version": "latest" | |
}, | |
"osDisk": { | |
"createOption": "fromImage", | |
"vhd": { | |
"uri": "[concat(concat(reference(resourceId('Client', 'Microsoft.Storage/storageAccounts', parameters('storageAccountName')), '2015-06-15').primaryEndpoints['blob'], 'vhds/'), parameters('virtualMachineName'), '20170621103145.vhd')]" | |
}, | |
"name": "[parameters('virtualMachineName')]" | |
}, | |
"dataDisks": [] | |
}, | |
"networkProfile": { | |
"networkInterfaces": [ | |
{ | |
"id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaceName'))]" | |
} | |
] | |
} | |
} | |
}, | |
{ | |
"name": "[parameters('storageAccountName')]", | |
"type": "Microsoft.Storage/storageAccounts", | |
"apiVersion": "2015-06-15", | |
"location": "[parameters('location')]", | |
"properties": { | |
"accountType": "[parameters('storageAccountType')]" | |
} | |
}, | |
{ | |
"name": "[parameters('virtualNetworkName')]", | |
"type": "Microsoft.Network/virtualNetworks", | |
"apiVersion": "2016-12-01", | |
"location": "[parameters('location')]", | |
"properties": { | |
"addressSpace": { | |
"addressPrefixes": [ | |
"[parameters('addressPrefix')]" | |
] | |
}, | |
"subnets": [ | |
{ | |
"name": "[parameters('subnetName')]", | |
"properties": { | |
"addressPrefix": "[parameters('subnetPrefix')]" | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"name": "[parameters('networkInterfaceName')]", | |
"type": "Microsoft.Network/networkInterfaces", | |
"apiVersion": "2016-09-01", | |
"location": "[parameters('location')]", | |
"dependsOn": [ | |
"[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]", | |
"[concat('Microsoft.Network/publicIpAddresses/', parameters('publicIpAddressName'))]", | |
"[concat('Microsoft.Network/networkSecurityGroups/', parameters('networkSecurityGroupName'))]" | |
], | |
"properties": { | |
"ipConfigurations": [ | |
{ | |
"name": "ipconfig1", | |
"properties": { | |
"subnet": { | |
"id": "[variables('subnetRef')]" | |
}, | |
"privateIPAllocationMethod": "Dynamic", | |
"publicIpAddress": { | |
"id": "[resourceId('Client','Microsoft.Network/publicIpAddresses', parameters('publicIpAddressName'))]" | |
} | |
} | |
} | |
], | |
"networkSecurityGroup": { | |
"id": "[resourceId('Client', 'Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroupName'))]" | |
} | |
} | |
}, | |
{ | |
"name": "[parameters('publicIpAddressName')]", | |
"type": "Microsoft.Network/publicIpAddresses", | |
"apiVersion": "2016-09-01", | |
"location": "[parameters('location')]", | |
"properties": { | |
"publicIpAllocationMethod": "[parameters('publicIpAddressType')]" | |
} | |
}, | |
{ | |
"name": "[parameters('networkSecurityGroupName')]", | |
"type": "Microsoft.Network/networkSecurityGroups", | |
"apiVersion": "2016-09-01", | |
"location": "[parameters('location')]", | |
"properties": { | |
"securityRules": [ | |
{ | |
"name": "default-allow-rdp", | |
"properties": { | |
"priority": 1000, | |
"sourceAddressPrefix": "*", | |
"protocol": "TCP", | |
"destinationPortRange": "3389", | |
"access": "Allow", | |
"direction": "Inbound", | |
"sourcePortRange": "*", | |
"destinationAddressPrefix": "*" | |
} | |
} | |
] | |
} | |
} | |
], | |
"outputs": { | |
"adminUsername": { | |
"type": "string", | |
"value": "[parameters('adminUsername')]" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment