Skip to content

Commit

Permalink
FMG HA: unique string
Browse files Browse the repository at this point in the history
  • Loading branch information
jvhoof committed Jul 18, 2024
1 parent ec561c1 commit f8dd2fa
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions FortiManager/ha/mainTemplate.json
Original file line number Diff line number Diff line change
Expand Up @@ -397,10 +397,10 @@
"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",
"fmgACustomDataHAManual": "[concat('config system ha\n set mode primary\n set clusterid 10\n set password ', base64(parameters('adminPassword')), '\n config peer\n edit 1\n set serial-number ', parameters('fortiManagerSerialNumberB'), '\n set ip ', variables('sn1IPfmgB'), '\n next\n end\n end\n')]",
"fmgBCustomDataHAManual": "[concat('config system ha\n set mode secondary\n set clusterid 10\n set password ', base64(parameters('adminPassword')), '\n config peer\n edit 1\n set serial-number ', parameters('fortiManagerSerialNumberA'), '\n set ip ', variables('sn1IPfmgA'),'\n next\n end\n end\n')]",
"fmgACustomDataHAVRRPvipExternal": "[concat('config system ha\n set clusterid 10\n set failover-mode vrrp\n set hb-interval 5\n set hb-lost-threshold 10\n set password ', substring(base64(parameters('adminPassword')),0,15), '\n config peer\n edit 1\n set serial-number ', parameters('fortiManagerSerialNumberB'), '\n set ip ', variables('sn1IPfmgB'), '\n next\n end\n set priority 100\n set unicast enable\n set vip ', variables('sn1IPfmgA-2'), '\n set vrrp-interface port1\n end\n')]",
"fmgBCustomDataHAVRRPvipExternal": "[concat('config system ha\n set clusterid 10\n set failover-mode vrrp\n set hb-interval 5\n set hb-lost-threshold 10\n set password ', substring(base64(parameters('adminPassword')),0,15), '\n config peer\n edit 1\n set serial-number ', parameters('fortiManagerSerialNumberA'), '\n set ip ', variables('sn1IPfmgA'),'\n next\n end\n set priority 100\n set unicast enable\n set vip ', variables('sn1IPfmgA-2'), '\n set vrrp-interface port1\n end\n')]",
"fmgACustomDataHAVRRPvipInternal": "[concat('config system ha\n set clusterid 10\n set failover-mode vrrp\n set hb-interval 5\n set hb-lost-threshold 10\n set password ', substring(base64(parameters('adminPassword')),0,15), '\n config peer\n edit 1\n set serial-number ', parameters('fortiManagerSerialNumberB'), '\n set ip ', variables('sn1IPfmgB'), '\n next\n end\n set priority 100\n set unicast enable\n set vip ', variables('sn1IPfmgA-2'), '\n set vrrp-interface port1\n end\n')]",
"fmgBCustomDataHAVRRPvipInternal": "[concat('config system ha\n set clusterid 10\n set failover-mode vrrp\n set hb-interval 5\n set hb-lost-threshold 10\n set password ', substring(base64(parameters('adminPassword')),0,15), '\n config peer\n edit 1\n set serial-number ', parameters('fortiManagerSerialNumberA'), '\n set ip ', variables('sn1IPfmgA'),'\n next\n end\n set priority 100\n set unicast enable\n set vip ', variables('sn1IPfmgA-2'), '\n set vrrp-interface port1\n end\n')]",
"fmgACustomDataHAVRRPvipExternal": "[concat('config system ha\n set clusterid 10\n set failover-mode vrrp\n set hb-interval 5\n set hb-lost-threshold 10\n set password ', uniqueString(resourceGroup().id), '\n config peer\n edit 1\n set serial-number ', parameters('fortiManagerSerialNumberB'), '\n set ip ', variables('sn1IPfmgB'),'\n next\n end\n set priority 100\n set unicast enable\n set vip ', variables('sn1IPfmgA-2'), '\n set vrrp-interface port1\n end\n')]",
"fmgBCustomDataHAVRRPvipExternal": "[concat('config system ha\n set clusterid 10\n set failover-mode vrrp\n set hb-interval 5\n set hb-lost-threshold 10\n set password ', uniqueString(resourceGroup().id), '\n config peer\n edit 1\n set serial-number ', parameters('fortiManagerSerialNumberA'), '\n set ip ', variables('sn1IPfmgA'),'\n next\n end\n set priority 100\n set unicast enable\n set vip ', variables('sn1IPfmgA-2'), '\n set vrrp-interface port1\n end\n')]",
"fmgACustomDataHAVRRPvipInternal": "[concat('config system ha\n set clusterid 10\n set failover-mode vrrp\n set hb-interval 5\n set hb-lost-threshold 10\n set password ', uniqueString(resourceGroup().id), '\n config peer\n edit 1\n set serial-number ', parameters('fortiManagerSerialNumberB'), '\n set ip ', variables('sn1IPfmgB'),'\n next\n end\n set priority 100\n set unicast enable\n set vip ', variables('sn1IPfmgA-2'), '\n set vrrp-interface port1\n end\n')]",
"fmgBCustomDataHAVRRPvipInternal": "[concat('config system ha\n set clusterid 10\n set failover-mode vrrp\n set hb-interval 5\n set hb-lost-threshold 10\n set password ', uniqueString(resourceGroup().id), '\n config peer\n edit 1\n set serial-number ', parameters('fortiManagerSerialNumberA'), '\n set ip ', variables('sn1IPfmgA'),'\n next\n end\n set priority 100\n set unicast enable\n set vip ', variables('sn1IPfmgA-2'), '\n set vrrp-interface port1\n end\n')]",
"fmgACustomDataBody": "[concat('config system global\n set admin-lockout-duration 120\n set hostname ', variables('fmgAVmName'), '\n end\nconfig system interface\nedit port1\nset mode static\nset ip ', variables('sn1IPfmgA'), '/', variables('sn1CIDRmask'), '\nset description fortimanager\nset allowaccess ping ssh https\nnext\nend\nconfig system route\nedit 1\nset dst 0.0.0.0/0\nset gateway ', variables('sn1GatewayIP'), '\nset device port1\nnext\nend\n', if(equals(parameters('highavailabilityMethod'),'manual'),variables('fmgACustomDataHAManual'),''), if(equals(parameters('highavailabilityMethod'),'vrrp-external-vip'),variables('fmgACustomDataHAVRRPvipExternal'),''), if(equals(parameters('highavailabilityMethod'),'vrrp-internal-vip'),variables('fmgACustomDataHAVRRPvipInternal'),''), parameters('additionalCustomData'), variables('fmgACustomDataFortiFlex'))]",
"fmgBCustomDataBody": "[concat('config system global\n set admin-lockout-duration 120\n set hostname ', variables('fmgBVmName'), '\n end\nconfig system interface\nedit port1\nset mode static\nset ip ', variables('sn1IPfmgB'), '/', variables('sn1CIDRmask'), '\nset description fortimanager\nset allowaccess ping ssh https\nnext\nend\nconfig system route\nedit 1\nset dst 0.0.0.0/0\nset gateway ', variables('sn1GatewayIP'), '\nset device port1\nnext\nend\n', if(equals(parameters('highavailabilityMethod'),'manual'),variables('fmgBCustomDataHAManual'),''), if(equals(parameters('highavailabilityMethod'),'vrrp-external-vip'),variables('fmgBCustomDataHAVRRPvipExternal'),''), if(equals(parameters('highavailabilityMethod'),'vrrp-internal-vip'),variables('fmgBCustomDataHAVRRPvipInternal'),''), parameters('additionalCustomData'), variables('fmgBCustomDataFortiFlex'))]",
"customDataLicenseHeader": "--12345\nContent-Type: text/plain; charset=\"us-ascii\"\nMIME-Version: 1.0\nContent-Transfer-Encoding: 7bit\nContent-Disposition: attachment; filename=\"fmglicense\"\n\n",
Expand Down Expand Up @@ -799,7 +799,7 @@
"computerName": "[variables('fmgAVmName')]",
"adminUsername": "[parameters('adminUsername')]",
"adminPassword": "[parameters('adminPassword')]",
"customData": "[base64(if(equals(parameters('highavailabilityMethod'),'vrrp-external-vip'),replace(variables('fmgACustomData'),concat('set vip ', variables('sn1IPfmgA-2')), concat('set vip ', reference(resourceId('Microsoft.Network/publicIPAddresses',variables('publicIP3Name'))).IpAddress)),variables('fmgACustomData')))]]"
"customData": "[base64(if(equals(parameters('highavailabilityMethod'),'vrrp-external-vip'),replace(variables('fmgACustomData'),concat('set vip ', variables('sn1IPfmgA-2')), concat('set vip ', reference(resourceId('Microsoft.Network/publicIPAddresses',variables('publicIP3Name'))).IpAddress)),variables('fmgACustomData')))]"
},
"storageProfile": {
"imageReference": {
Expand Down Expand Up @@ -877,7 +877,7 @@
"computerName": "[variables('fmgBVmName')]",
"adminUsername": "[parameters('adminUsername')]",
"adminPassword": "[parameters('adminPassword')]",
"customData": "[base64(if(equals(parameters('highavailabilityMethod'),'vrrp-external-vip'),replace(variables('fmgBCustomData'),concat('set vip ', variables('sn1IPfmgA-2')), concat('set vip ', reference(resourceId('Microsoft.Network/publicIPAddresses',variables('publicIP3Name'))).IpAddress)),variables('fmgBCustomData')))]]"
"customData": "[base64(if(equals(parameters('highavailabilityMethod'),'vrrp-external-vip'),replace(variables('fmgBCustomData'),concat('set vip ', variables('sn1IPfmgA-2')), concat('set vip ', reference(resourceId('Microsoft.Network/publicIPAddresses',variables('publicIP3Name'))).IpAddress)),variables('fmgBCustomData')))]"
},
"storageProfile": {
"imageReference": {
Expand Down

0 comments on commit f8dd2fa

Please sign in to comment.