Skip to content

Commit

Permalink
FGT A/A 3nic: conditional ILB
Browse files Browse the repository at this point in the history
  • Loading branch information
jvhoof committed Dec 20, 2024
1 parent 280bd8e commit 885913e
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions FortiGate/Playground/Active-Active-simple-3nic/mainTemplate.json
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,20 @@
"description": "Accelerated Connections Auxiliary SKU bandwidth Tiers"
}
},
"internalLoadBalancer": {
"type": "bool",
"defaultValue": true,
"metadata": {
"description": "Deploy a new internal load balancer."
}
},
"internalLoadBalancerBackendPoolId": {
"type": "string",
"metadata": {
"description": "Reference an existing internal load balancer backend pool."
}
},

"vnetNewOrExisting": {
"type": "string",
"defaultValue": "new",
Expand Down Expand Up @@ -439,6 +453,11 @@
"internalLBBEId": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools',variables('internalLBName'),variables('internalLBBEName'))]",
"internalLBProbeName": "lbprobe",
"internalLBProbeId": "[resourceId('Microsoft.Network/loadBalancers/probes',variables('internalLBName'),variables('internalLBProbeName'))]",
"internalLBBackendAddressPools": [
{
"id": "[if(parameters('internalLoadBalancer'),variables('internalLBBEId'),parameters('internalLoadBalancerBackendPoolId'))]"
}
],
"pipZones": "[pickZones('Microsoft.Network', 'publicIPAddresses', parameters('location'), 3)]",
"imageReferenceMarketplace": {
"publisher": "[variables('imagePublisher')]",
Expand Down Expand Up @@ -570,6 +589,7 @@
}
},
{
"condition": "[parameters('internalLoadBalancer')]",
"type": "Microsoft.Network/loadBalancers",
"name": "[variables('internalLBName')]",
"apiVersion": "2023-06-01",
Expand Down Expand Up @@ -693,11 +713,7 @@
"subnet": {
"id": "[variables('subnet2Id')]"
},
"loadBalancerBackendAddressPools": [
{
"id": "[variables('internalLBBEId')]"
}
]
"loadBalancerBackendAddressPools": "[if(or(parameters('internalLoadBalancer'),greater(length(parameters('internalLoadBalancerBackendPoolId')),0)),variables('internalLBBackendAddressPools'),json('null'))]"
}
}
],
Expand Down

0 comments on commit 885913e

Please sign in to comment.