|
135 | 135 | "name_storageAccount": "[concat('storage',take(replace(parameters('guidValue'),'-',''),6))]", |
136 | 136 | "name_virtualNetwork": "[concat(variables('const_dnsLabelPrefix'), '-vnet')]", |
137 | 137 | "ref_networkSecurityGroup": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('name_networkSecurityGroup'))]", |
| 138 | + "ref_publicIPAddress": "[resourceId('Microsoft.Network/publicIPAddresses', variables('name_publicIPAddress'))]", |
138 | 139 | "ref_storage": "[resourceId('Microsoft.Storage/storageAccounts', variables('name_storageAccount'))]", |
139 | 140 | "ref_subnet": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('name_virtualNetwork'), variables('const_subnetName'))]", |
140 | 141 | "ref_virtualNetwork": "[resourceId('Microsoft.Network/virtualNetworks', variables('name_virtualNetwork'))]" |
|
230 | 231 | { |
231 | 232 | "type": "Microsoft.Network/publicIPAddresses", |
232 | 233 | "apiVersion": "${azure.apiVersion}", |
233 | | - "name": "[concat(if(equals(copyIndex(), 0), variables('name_dmgrVM'), concat(variables('const_managedVMPrefix'), copyIndex())), '-ip')]", |
| 234 | + "name": "[variables('name_publicIPAddress')]", |
234 | 235 | "location": "[parameters('location')]", |
235 | | - "copy": { |
236 | | - "name": "publicIPLoop", |
237 | | - "count": "[parameters('numberOfNodes')]" |
238 | | - }, |
239 | 236 | "properties": { |
240 | 237 | "publicIPAllocationMethod": "Dynamic", |
241 | 238 | "dnsSettings": { |
242 | | - "domainNameLabel": "[concat(toLower(variables('const_dnsLabelPrefix')), if(equals(copyIndex(), 0), '', concat('-mn', copyIndex())))]" |
| 239 | + "domainNameLabel": "[concat(toLower(variables('const_dnsLabelPrefix')))]" |
243 | 240 | } |
244 | 241 | } |
245 | 242 | }, |
246 | 243 | { |
247 | 244 | "type": "Microsoft.Network/networkInterfaces", |
248 | 245 | "apiVersion": "${azure.apiVersion}", |
249 | | - "name": "[concat(if(equals(copyIndex(), 0), variables('name_dmgrVM'), concat(variables('const_managedVMPrefix'), copyIndex())), '-if')]", |
| 246 | + "name": "[concat(variables('name_dmgrVM'), '-if')]", |
| 247 | + "location": "[parameters('location')]", |
| 248 | + "dependsOn": [ |
| 249 | + "[variables('ref_publicIPAddress')]", |
| 250 | + "[variables('ref_subnet')]" |
| 251 | + ], |
| 252 | + "properties": { |
| 253 | + "ipConfigurations": [ |
| 254 | + { |
| 255 | + "name": "ipconfig1", |
| 256 | + "properties": { |
| 257 | + "privateIPAllocationMethod": "Dynamic", |
| 258 | + "publicIPAddress": { |
| 259 | + "id": "[variables('ref_publicIPAddress')]" |
| 260 | + }, |
| 261 | + "subnet": { |
| 262 | + "id": "[variables('ref_subnet')]" |
| 263 | + } |
| 264 | + } |
| 265 | + } |
| 266 | + ] |
| 267 | + } |
| 268 | + }, |
| 269 | + { |
| 270 | + "type": "Microsoft.Network/networkInterfaces", |
| 271 | + "apiVersion": "${azure.apiVersion}", |
| 272 | + "name": "[concat(variables('const_managedVMPrefix'), copyIndex(1), '-if')]", |
250 | 273 | "location": "[parameters('location')]", |
251 | 274 | "copy": { |
252 | 275 | "name": "nicLoop", |
253 | | - "count": "[parameters('numberOfNodes')]" |
| 276 | + "count": "[sub(parameters('numberOfNodes'), 1)]" |
254 | 277 | }, |
255 | 278 | "dependsOn": [ |
256 | | - "publicIPLoop", |
257 | 279 | "[variables('ref_subnet')]" |
258 | 280 | ], |
259 | 281 | "properties": { |
|
262 | 284 | "name": "ipconfig1", |
263 | 285 | "properties": { |
264 | 286 | "privateIPAllocationMethod": "Dynamic", |
265 | | - "publicIPAddress": { |
266 | | - "id": "[resourceId('Microsoft.Network/publicIPAddresses', concat(if(equals(copyIndex(), 0), variables('name_dmgrVM'), concat(variables('const_managedVMPrefix'), copyIndex())), '-ip'))]" |
267 | | - }, |
268 | 287 | "subnet": { |
269 | 288 | "id": "[variables('ref_subnet')]" |
270 | 289 | } |
|
283 | 302 | "count": "[parameters('numberOfNodes')]" |
284 | 303 | }, |
285 | 304 | "dependsOn": [ |
| 305 | + "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('name_dmgrVM'), '-if'))]", |
286 | 306 | "nicLoop" |
287 | 307 | ], |
288 | 308 | "properties": { |
|
0 commit comments