/
deploy-jumpbox.json
141 lines (141 loc) · 5.18 KB
/
deploy-jumpbox.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
{
"$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]"
}
}
}