-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreatingNetscalerUser.json
205 lines (204 loc) · 6.13 KB
/
creatingNetscalerUser.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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"vhdStorageAccount": {
"type": "string",
"metadata": {
"description": "Specifies the name of the storage account used for virtual machine disks. This has to be a unique name, up to 24 chars, all lowercase."
}
},
"imageUri": {
"type": "string",
"metadata": {
"description": "Specifies the user image URI to provision this machine on. Must contain the 7.7 release of XenApp."
}
},
"publisher": {
"type": "string",
"metadata": {
"description": "Specifies the marketplace publisher of the image to provision this machine on."
}
},
"offer": {
"type": "string",
"metadata": {
"description": "Specifies the marketplace offer of the image to provision this machine on."
}
},
"sku": {
"type": "string",
"metadata": {
"description": "Specifies the marketplace sku of the image to provision this machine on."
}
},
"machineSize": {
"type": "string",
"defaultValue": "Standard_A2",
"metadata": {
"description": "Specifies the size of the virtual machine."
}
},
"machineName": {
"type": "string",
"metadata": {
"description": "Specifies the name of this machine in Azure and on the network."
}
},
"privateIp": {
"type": "string",
"metadata": {
"description": "Specifies the static IP to assign to this machine."
}
},
"availabilitySetId": {
"type": "string",
"metadata": {
"description": "Specifies the availability set this machine should belong to."
}
},
"subnetId": {
"type": "string",
"metadata": {
"description": "Specifies the id of the subnet the machine should connect to."
}
},
"dnsServers": {
"type": "array",
"metadata": {
"description": "Specifies a list of DNS servers the machine should use."
}
},
"lbBapId": {
"type": "string",
"metadata": {
"description": "Specifies the id of the load balancer's back end address pool."
}
},
"lbInboundRules": {
"type": "array",
"metadata": {
"description": "Specifies a list of inbound NAT rules to apply to this VM."
}
},
"adminUsername": {
"type": "string",
"metadata": {
"description": "Specifies the name of the administrator for machines, Active Directory domain, NetScaler and XenApp. Exclusion list: 'admin','administrator'. Must be no more than 9 alphanumeric characters."
}
},
"adminPassword": {
"type": "securestring",
"metadata": {
"description": "Specifies the password of the administrator for machines, Active Directory domain, NetScaler and XenApp."
}
}
},
"variables": {
"imagePublisher": "[parameters('publisher')]",
"imageOffer": "[parameters('offer')]",
"imageSKU": "[parameters('sku')]",
"planPublisher": "[parameters('publisher')]",
"planProduct": "[parameters('offer')]",
"planName": "[parameters('sku')]",
"nicName": "[concat(parameters('machineName'),'-Nic')]",
"nicId": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]",
"machineId": "[resourceId('Microsoft.Compute/virtualMachines',parameters('machineName'))]",
"osDiskName": "[concat(resourceGroup().name,'-',parameters('machineName'),'-osdisk')]",
"osDiskUri": "[concat('http://',parameters('vhdStorageAccount'),'.blob.core.windows.net/vhds/',variables('osDiskName'),'.vhd')]"
},
"resources": [
{
"apiVersion": "2015-06-15",
"type": "Microsoft.Network/networkInterfaces",
"name": "[variables('nicName')]",
"tags": {
"displayName": "NetscalerNic"
},
"location": "[resourceGroup().location]",
"properties": {
"ipConfigurations": [
{
"name": "ipconfig",
"properties": {
"privateIPAllocationMethod": "Static",
"privateIPAddress": "[parameters('privateIp')]",
"subnet": {
"id": "[parameters('subnetId')]"
},
"loadBalancerBackendAddressPools": [
{
"id": "[parameters('lbBapId')]"
}
],
"loadBalancerInboundNatRules": "[parameters('lbInboundRules')]"
}
}
]
}
},
{
"apiVersion": "2015-06-15",
"type": "Microsoft.Compute/virtualMachines",
"name": "[parameters('machineName')]",
"tags": {
"displayName": "NetscalerVM"
},
"location": "[resourceGroup().location]",
"dependsOn": [
"[variables('nicId')]"
],
"properties": {
"availabilitySet": {
"id": "[parameters('availabilitySetId')]"
},
"hardwareProfile": {
"vmSize": "[parameters('machineSize')]"
},
"osProfile": {
"computerName": "[parameters('machineName')]",
"adminUsername": "[parameters('adminUsername')]",
"adminPassword": "[parameters('adminPassword')]",
"linuxConfiguration": {
"disablePasswordAuthentication": "false"
}
},
"storageProfile": {
"osDisk": {
"image": {
"uri": "[parameters('imageUri')]"
},
"osType": "Linux",
"name": "osDisk",
"vhd": {
"uri": "[variables('osDiskUri')]"
},
"caching": "ReadWrite",
"createOption": "FromImage"
}
},
"networkProfile": {
"networkInterfaces": [
{
"id": "[variables('nicId')]"
}
]
}
}
}
],
"outputs": {
"machineId": {
"type": "string",
"value": "[variables('machineId')]"
},
"nicId": {
"type": "string",
"value": "[variables('nicId')]"
},
"nicName": {
"type": "string",
"value": "[variables('nicName')]"
}
}
}