|
19 | 19 | "metadata": {
|
20 | 20 | "description": "Number of FortiGate VM instances to deploy"
|
21 | 21 | },
|
22 |
| - "defaultValue": "2" |
| 22 | + "defaultValue": 2 |
23 | 23 | },
|
24 | 24 | "fortiGateNamePrefix": {
|
25 | 25 | "type": "string",
|
|
393 | 393 | "description": "FortiManager serial number to add the deployed FortiGate into the FortiManager"
|
394 | 394 | }
|
395 | 395 | },
|
396 |
| - "fortiGateLicenseBYOLA": { |
| 396 | + "fortiGateLicenseBYOL1": { |
397 | 397 | "type": "string",
|
398 | 398 | "defaultValue": "",
|
399 | 399 | "metadata": {
|
400 |
| - "description": "First FortiGate BYOL license content" |
| 400 | + "description": "FortiProxy 1 BYOL license content" |
401 | 401 | }
|
402 | 402 | },
|
403 |
| - "fortiGateLicenseBYOLB": { |
| 403 | + "fortiGateLicenseBYOL2": { |
404 | 404 | "type": "string",
|
405 | 405 | "defaultValue": "",
|
406 | 406 | "metadata": {
|
407 |
| - "description": "Second FortiGate BYOL license content" |
| 407 | + "description": "FortiProxy 2 BYOL license content" |
408 | 408 | }
|
409 | 409 | },
|
410 |
| - "fortiGateLicenseBYOLC": { |
| 410 | + "fortiGateLicenseBYOL3": { |
411 | 411 | "type": "string",
|
412 | 412 | "defaultValue": "",
|
413 | 413 | "metadata": {
|
414 |
| - "description": "Third FortiGate BYOL license content" |
| 414 | + "description": "FortiProxy 3 BYOL license content" |
415 | 415 | }
|
416 | 416 | },
|
417 |
| - "fortiGateLicenseFortiFlexA": { |
| 417 | + "fortiGateLicenseBYOL4": { |
418 | 418 | "type": "string",
|
419 | 419 | "defaultValue": "",
|
420 | 420 | "metadata": {
|
421 |
| - "description": "First FortiGate BYOL FortiFlex license token" |
| 421 | + "description": "FortiProxy 4 BYOL license content" |
422 | 422 | }
|
423 | 423 | },
|
424 |
| - "fortiGateLicenseFortiFlexB": { |
| 424 | + "fortiGateLicenseBYOL5": { |
425 | 425 | "type": "string",
|
426 | 426 | "defaultValue": "",
|
427 | 427 | "metadata": {
|
428 |
| - "description": "Second FortiGate BYOL FortiFlex license token" |
| 428 | + "description": "FortiProxy 5 BYOL license content" |
429 | 429 | }
|
430 | 430 | },
|
431 |
| - "fortiGateLicenseFortiFlexC": { |
| 431 | + "fortiGateLicenseBYOL6": { |
432 | 432 | "type": "string",
|
433 | 433 | "defaultValue": "",
|
434 | 434 | "metadata": {
|
435 |
| - "description": "Third FortiGate BYOL FortiFlex license token" |
| 435 | + "description": "FortiProxy 6 BYOL license content" |
436 | 436 | }
|
437 | 437 | },
|
| 438 | + "fortiGateLicenseBYOL7": { |
| 439 | + "type": "string", |
| 440 | + "defaultValue": "", |
| 441 | + "metadata": { |
| 442 | + "description": "FortiProxy 7 BYOL license content" |
| 443 | + } |
| 444 | + }, |
| 445 | + "fortiGateLicenseBYOL8": { |
| 446 | + "type": "string", |
| 447 | + "defaultValue": "", |
| 448 | + "metadata": { |
| 449 | + "description": "FortiProxy 8 BYOL license content" |
| 450 | + } |
| 451 | + }, |
| 452 | + "fortiGateLicenseFortiFlex1": { |
| 453 | + "type": "string", |
| 454 | + "defaultValue": "", |
| 455 | + "metadata": { |
| 456 | + "description": "FortiProxy 1 BYOL license content" |
| 457 | + } |
| 458 | + }, |
| 459 | + "fortiGateLicenseFortiFlex2": { |
| 460 | + "type": "string", |
| 461 | + "defaultValue": "", |
| 462 | + "metadata": { |
| 463 | + "description": "FortiProxy 2 BYOL license content" |
| 464 | + } |
| 465 | + }, |
| 466 | + "fortiGateLicenseFortiFlex3": { |
| 467 | + "type": "string", |
| 468 | + "defaultValue": "", |
| 469 | + "metadata": { |
| 470 | + "description": "FortiProxy 3 BYOL license content" |
| 471 | + } |
| 472 | + }, |
| 473 | + "fortiGateLicenseFortiFlex4": { |
| 474 | + "type": "string", |
| 475 | + "defaultValue": "", |
| 476 | + "metadata": { |
| 477 | + "description": "FortiProxy 4 BYOL license content" |
| 478 | + } |
| 479 | + }, |
| 480 | + "fortiGateLicenseFortiFlex5": { |
| 481 | + "type": "string", |
| 482 | + "defaultValue": "", |
| 483 | + "metadata": { |
| 484 | + "description": "FortiProxy 5 BYOL license content" |
| 485 | + } |
| 486 | + }, |
| 487 | + "fortiGateLicenseFortiFlex6": { |
| 488 | + "type": "string", |
| 489 | + "defaultValue": "", |
| 490 | + "metadata": { |
| 491 | + "description": "FortiProxy 6 BYOL license content" |
| 492 | + } |
| 493 | + }, |
| 494 | + "fortiGateLicenseFortiFlex7": { |
| 495 | + "type": "string", |
| 496 | + "defaultValue": "", |
| 497 | + "metadata": { |
| 498 | + "description": "FortiProxy 7 BYOL license content" |
| 499 | + } |
| 500 | + }, |
| 501 | + "fortiGateLicenseFortiFlex8": { |
| 502 | + "type": "string", |
| 503 | + "defaultValue": "", |
| 504 | + "metadata": { |
| 505 | + "description": "FortiProxy 8 BYOL license content" |
| 506 | + } |
| 507 | + }, |
| 508 | + |
438 | 509 | "customImageReference": {
|
439 | 510 | "type": "string",
|
440 | 511 | "defaultValue": "",
|
|
473 | 544 | "subnet1Id": "[if(equals(parameters('vnetNewOrExisting'),'new'),resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vnetName'),parameters('subnet1Name')),resourceId(parameters('vnetResourceGroup'),'Microsoft.Network/virtualNetworks/subnets', variables('vnetName'),parameters('subnet1Name')))]",
|
474 | 545 | "subnet2Id": "[if(equals(parameters('vnetNewOrExisting'),'new'),resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vnetName'),parameters('subnet2Name')),resourceId(parameters('vnetResourceGroup'),'Microsoft.Network/virtualNetworks/subnets', variables('vnetName'),parameters('subnet2Name')))]",
|
475 | 546 | "fgVmName": "[concat(parameters('fortiGateNamePrefix'),'-fgt')]",
|
476 |
| - "fmgCustomData": "[if(equals(parameters('fortiManager'),'yes'),concat('\nconfig system central-management\nset type fortimanager\n set fmg ',parameters('fortiManagerIP'),'\nset serial-number ', parameters('fortiManagerSerial'), '\nend\n config system interface\n edit port1\n append allowaccess fgfm\n end\n config system interface\n edit port2\n append allowaccess fgfm\n end\n'),'')]", |
| 547 | + "fmgCustomData": "[if(equals(parameters('fortiManager'),'yes'),concat('\nconfig system central-management\nset type fortimanager\nset fmg ',parameters('fortiManagerIP'),'\nset serial-number ', parameters('fortiManagerSerial'), '\nend\nconfig system interface\nedit port1\nappend allowaccess fgfm\nend\nconfig system interface\nedit port2\nappend allowaccess fgfm\nend\n'),'')]", |
477 | 548 | "customDataHeader": "Content-Type: multipart/mixed; boundary=\"12345\"\nMIME-Version: 1.0\n\n--12345\nContent-Type: text/plain; charset=\"us-ascii\"\nMIME-Version: 1.0\nContent-Transfer-Encoding: 7bit\nContent-Disposition: attachment; filename=\"config\"\n\n",
|
478 |
| - "customDataInterface2NIC": "[if(parameters('externalLoadBalancer'),concat('config system interface\n edit port1\n set mode dhcp\n set description external\n set allowaccess ping ssh https probe-response\n next\n edit port2\n set mode dhcp\n set description internal\n set allowaccess ping ssh https probe-response\n next\n end\n'),'')]", |
479 |
| - "customDataInterface1NIC": "[if(not(parameters('externalLoadBalancer')),concat('config system interface\n edit port1\n set mode dhcp\n set description internal\n set allowaccess ping ssh https probe-response\n next\n end\n'),'')]", |
480 |
| - "customDataBody": "[concat('config system sdn-connector\nedit AzureSDN\nset type azure\nnext\nend\nconfig router static\n edit 1\n set dst ', parameters('vnetAddressPrefix'), '\n set gateway ', variables('sn2GatewayIP'), '\n set device port2\n next\n edit 3\nset dst 168.63.129.16 255.255.255.255\nset device port2\n set gateway ', variables ('sn2GatewayIP'), '\n next\nedit 4\nset dst 168.63.129.16 255.255.255.255\nset device port1\n set gateway ', variables ('sn1GatewayIP'), '\n next\n end\n config system probe-response\n set mode http-probe\n end\n', if(parameters('externalLoadBalancer'), variables('customDataInterface2NIC'), variables('customDataInterface1NIC')), variables('fmgCustomData'), parameters('fortiGateAdditionalCustomData'), '\n')]", |
| 549 | + "customDataInterface2NIC": "[if(parameters('externalLoadBalancer'),concat('config system interface\nedit port1\nset mode dhcp\nset description external\nset allowaccess ping ssh https probe-response\nnext\nedit port2\nset mode dhcp\nset description internal\nset allowaccess ping ssh https probe-response\nnext\nend\n'),'')]", |
| 550 | + "customDataInterface1NIC": "[if(not(parameters('externalLoadBalancer')),concat('config system interface\nedit port1\nset mode dhcp\nset description internal\nset allowaccess ping ssh https probe-response\nnext\nend\n'),'')]", |
| 551 | + "customDataBodyShared": "[concat('config system sdn-connector\nedit AzureSDN\nset type azure\nnext\nend\nconfig router static\nedit 1\nset dst ', parameters('vnetAddressPrefix'), '\nset gateway ', variables('sn2GatewayIP'), '\nset device port2\nnext\nedit 2\nset dst 168.63.129.16 255.255.255.255\nset device port2\nset gateway ', variables ('sn2GatewayIP'), '\nnext\nedit 4\nset dst 168.63.129.16 255.255.255.255\nset device port1\nset gateway ', variables ('sn1GatewayIP'), '\nnext\nend\nconfig system probe-response\nset mode http-probe\nend\n', if(parameters('externalLoadBalancer'), variables('customDataInterface2NIC'), variables('customDataInterface1NIC')), variables('fmgCustomData'), parameters('fortiGateAdditionalCustomData'), '\n')]", |
481 | 552 | "customDataLicenseHeader": "--12345\nContent-Type: text/plain; charset=\"us-ascii\"\nMIME-Version: 1.0\nContent-Transfer-Encoding: 7bit\nContent-Disposition: attachment; filename=\"license\"\n\n",
|
482 | 553 | "customDataFooter": "\n--12345--\n",
|
483 |
| - "fgaCustomDataFortiFlex": "[if(equals(parameters('fortiGateLicenseFortiFlexA'),''),'',concat('LICENSE-TOKEN:',parameters('fortiGateLicenseFortiFlexA'), '\n'))]", |
484 |
| - "fgbCustomDataFortiFlex": "[if(equals(parameters('fortiGateLicenseFortiFlexB'),''),'',concat('LICENSE-TOKEN:',parameters('fortiGateLicenseFortiFlexB'), '\n'))]", |
485 |
| - "fgcCustomDataFortiFlex": "[if(equals(parameters('fortiGateLicenseFortiFlexC'),''),'',concat('LICENSE-TOKEN:',parameters('fortiGateLicenseFortiFlexC'), '\n'))]", |
486 |
| - "fgaCustomDataCombined": "[concat(variables('customDataHeader'),variables('customDataBody'),variables('customDataLicenseHeader'), variables('fgaCustomDataFortiFlex'), parameters('fortiGateLicenseBYOLA'), variables('customDataFooter'))]", |
487 |
| - "fgbCustomDataCombined": "[concat(variables('customDataHeader'),variables('customDataBody'),variables('customDataLicenseHeader'), variables('fgbCustomDataFortiFlex'), parameters('fortiGateLicenseBYOLB'), variables('customDataFooter'))]", |
488 |
| - "fgcCustomDataCombined": "[concat(variables('customDataHeader'),variables('customDataBody'),variables('customDataLicenseHeader'), variables('fgcCustomDataFortiFlex'), parameters('fortiGateLicenseBYOLC'), variables('customDataFooter'))]", |
489 |
| - "fgaCustomData": "[base64(if(and(equals(parameters('fortiGateLicenseBYOLA'),''),equals(parameters('fortiGateLicenseFortiFlexA'),'')),variables('customDataBody'),variables('fgaCustomDataCombined')))]", |
490 |
| - "fgbCustomData": "[base64(if(and(equals(parameters('fortiGateLicenseBYOLB'),''),equals(parameters('fortiGateLicenseFortiFlexB'),'')),variables('customDataBody'),variables('fgbCustomDataCombined')))]", |
491 |
| - "fgcCustomData": "[base64(if(and(equals(parameters('fortiGateLicenseBYOLC'),''),equals(parameters('fortiGateLicenseFortiFlexC'),'')),variables('customDataBody'),variables('fgcCustomDataCombined')))]", |
492 | 554 | "routeTable3Name": "[concat(parameters('fortiGateNamePrefix'),'-routetable-',parameters('subnet3Name'))]",
|
493 | 555 | "routeTable3Id": "[resourceId('Microsoft.Network/routeTables',variables('routeTable3Name'))]",
|
494 | 556 | "serialConsoleEnabled": "[if(equals(parameters('serialConsole'),'yes'),'true','false')]",
|
|
514 | 576 | "sn2GatewayIP": "[concat(variables('sn2IPArray0'),'.',variables('sn2IPArray1'),'.',variables('sn2IPArray2'),'.',variables('sn2IPArray3'))]",
|
515 | 577 | "sn2IPStartAddress": "[split(parameters('subnet2StartAddress'),'.')]",
|
516 | 578 | "sn2IPlb": "[concat(variables('sn2IPArray0'),'.',variables('sn2IPArray1'),'.',variables('sn2IPArray2'),'.',int(variables('sn2IPStartAddress')[3]))]",
|
| 579 | + "licenseBYOL": "[createArray(parameters('fortiGateLicenseBYOL1'), parameters('fortiGateLicenseBYOL2'), parameters('fortiGateLicenseBYOL3'), parameters('fortiGateLicenseBYOL4'), parameters('fortiGateLicenseBYOL5'), parameters('fortiGateLicenseBYOL6'), parameters('fortiGateLicenseBYOL7'), parameters('fortiGateLicenseBYOL8'))]", |
| 580 | + "licenseFortiFlex": "[createArray(parameters('fortiGateLicenseFortiFlex1'), parameters('fortiGateLicenseFortiFlex2'), parameters('fortiGateLicenseFortiFlex3'), parameters('fortiGateLicenseFortiFlex4'), parameters('fortiGateLicenseFortiFlex5'), parameters('fortiGateLicenseFortiFlex6'), parameters('fortiGateLicenseFortiFlex7'), parameters('fortiGateLicenseFortiFlex8'))]", |
| 581 | + "copy": [ |
| 582 | + { |
| 583 | + "name": "customDataFortiFlex", |
| 584 | + "count": "[length(range(1, 8))]", |
| 585 | + "input": "[if(equals(variables('licenseFortiFlex')[copyIndex('customDataFortiFlex')],''),'',concat('LICENSE-TOKEN:',variables('licenseFortiFlex')[copyIndex('customDataFortiFlex')], '\n'))]" |
| 586 | + }, |
| 587 | + { |
| 588 | + "name": "customDataBody", |
| 589 | + "count": "[length(range(1, 8))]", |
| 590 | + "input": "[concat(variables('customDataBodyShared'))]" |
| 591 | + }, |
| 592 | + { |
| 593 | + "name": "customDataCombined", |
| 594 | + "count": "[length(range(1, 8))]", |
| 595 | + "input": "[concat(variables('customDataHeader'),variables('customDataBody')[copyIndex('customDataCombined')],variables('customDataLicenseHeader'), variables('customDataFortiFlex')[copyIndex('customDataCombined')], variables('licenseBYOL')[copyIndex('customDataCombined')], variables('customDataFooter'))]" |
| 596 | + }, |
| 597 | + { |
| 598 | + "name": "customData", |
| 599 | + "count": "[length(range(1, 8))]", |
| 600 | + "input": "[base64(if(and(equals(variables('licenseBYOL')[copyIndex('customData')],''),equals(variables('licenseFortiFlex')[copyIndex('customData')],'')),variables('customDataBody')[copyIndex('customData')],variables('customDataCombined')[copyIndex('customData')]))]" |
| 601 | + } |
| 602 | + ], |
517 | 603 | "internalLBName": "[concat(parameters('fortiGateNamePrefix'),'-internalloadbalancer')]",
|
518 | 604 | "internalLBId": "[resourceId('Microsoft.Network/loadBalancers',variables('internalLBName'))]",
|
519 | 605 | "internalLBFEName": "[concat(parameters('fortiGateNamePrefix'),'-ilb-',parameters('subnet2Name'),'-frontend')]",
|
|
1012 | 1098 | "computerName": "[concat(variables('fgVmName'),'-',copyIndex(1))]",
|
1013 | 1099 | "adminUsername": "[parameters('adminUsername')]",
|
1014 | 1100 | "adminPassword": "[parameters('adminPassword')]",
|
1015 |
| - "customData": "[if(equals(copyIndex(1),'1'),variables('fgaCustomData'),if(equals(copyIndex(1),'2'),variables('fgbCustomData'),if(equals(copyIndex(1),'3'),variables('fgcCustomData'),base64(variables('customDataBody')))))]" |
| 1101 | + "customData": "[variables('customData')[copyIndex()]]" |
1016 | 1102 | },
|
1017 | 1103 | "storageProfile": {
|
1018 | 1104 | "imageReference": "[if(and(equals(parameters('fortiGateImageSKU'),'fortinet_fg-vm'),not(equals(parameters('customImageReference'),''))), variables('imageReferenceCustomImage'), variables('imageReferenceMarketplace'))]",
|
|
1057 | 1143 | "fortiGateFQDN": {
|
1058 | 1144 | "type": "string",
|
1059 | 1145 | "value": "[if(and(equals(parameters('publicIP1NewOrExisting'), 'new'),parameters('externalLoadBalancer')), reference(variables('publicIP1Id')).dnsSettings.fqdn, '' )]"
|
1060 |
| - }, |
1061 |
| - "customDataFGTa": { |
1062 |
| - "type": "string", |
1063 |
| - "value": "[variables('fgaCustomData')]" |
1064 |
| - }, |
1065 |
| - "customDataFGTb": { |
1066 |
| - "type": "string", |
1067 |
| - "value": "[variables('fgbCustomData')]" |
1068 |
| - }, |
1069 |
| - "customDataFGTc": { |
1070 |
| - "type": "string", |
1071 |
| - "value": "[variables('fgcCustomData')]" |
1072 | 1146 | }
|
1073 | 1147 | }
|
1074 | 1148 | }
|
0 commit comments