From 1ad997ae7098ea85f8fef1ed106faa594ba1a5ed Mon Sep 17 00:00:00 2001 From: Joeri Date: Fri, 15 Sep 2023 17:00:27 +0200 Subject: [PATCH] FPX no public ip --- FortiProxy/Active-Active/createUiDefinition.json | 8 ++++---- FortiProxy/Active-Active/mainTemplate.json | 13 +++++++------ FortiProxy/Active-Active/test/azuredeploy.tests.ps1 | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/FortiProxy/Active-Active/createUiDefinition.json b/FortiProxy/Active-Active/createUiDefinition.json index a2e790f6..3969a290 100644 --- a/FortiProxy/Active-Active/createUiDefinition.json +++ b/FortiProxy/Active-Active/createUiDefinition.json @@ -747,7 +747,7 @@ "hideNone": false, "hideDomainNameLabel": true }, - "visible": true + "visible": "[steps('publicip').externalLoadBalancer.enabled]" }, { "name": "standardsku", @@ -777,7 +777,7 @@ "icon": "Error", "text": "The External Load Balancer Public IP is configured using Basic SKU. Please return to previous blade and use Standard type public IPs to support Azure Standard Load Balancers" }, - "visible": "[not(equals(steps('publicip').loadbalancerpublicip.sku, 'Standard'))]" + "visible": "[and(steps('publicip').externalLoadBalancer.enabled,not(equals(steps('publicip').loadbalancerpublicip.sku, 'Standard')))]" }, { "name": "StandardIPConfirmation1", @@ -786,7 +786,7 @@ "icon": "Info", "text": "The External Load Balancer Public IP is Standard SKU. Proceed." }, - "visible": "[equals(steps('publicip').loadbalancerpublicip.sku, 'Standard')]" + "visible": "[and(steps('publicip').externalLoadBalancer.enabled,equals(steps('publicip').loadbalancerpublicip.sku, 'Standard'))]" } ] }, @@ -997,7 +997,7 @@ "externalLoadBalancer": "[bool(steps('publicip').externalLoadBalancer.enabled)]", "availabilityOptions": "[steps('instance').availabilityOptions.availabilityOptions]", "acceleratedNetworking": "[steps('networking').acceleratednetworksection.acceleratednetworking]", - "publicIP1NewOrExisting": "[steps('publicip').loadbalancerpublicip.newOrExistingOrNone]", + "publicIP1NewOrExistingOrNone": "[steps('publicip').loadbalancerpublicip.newOrExistingOrNone]", "publicIP1Name": "[steps('publicip').loadbalancerpublicip.name]", "publicIP1ResourceGroup": "[steps('publicip').loadbalancerpublicip.resourceGroup]", "vnetNewOrExisting": "[steps('networking').virtualnetworksection.virtualnetwork.newOrExisting]", diff --git a/FortiProxy/Active-Active/mainTemplate.json b/FortiProxy/Active-Active/mainTemplate.json index f2d5ae3c..12ddf12e 100644 --- a/FortiProxy/Active-Active/mainTemplate.json +++ b/FortiProxy/Active-Active/mainTemplate.json @@ -161,12 +161,13 @@ "description": "Accelerated Networking enables direct connection between the VM and network card. Only available on 2 CPU F/Fs and 4 CPU D/Dsv2, D/Dsv3, E/Esv3, Fsv2, Lsv2, Ms/Mms and Ms/Mmsv2" } }, - "publicIP1NewOrExisting": { + "publicIP1NewOrExistingOrNone": { "type": "string", "defaultValue": "new", "allowedValues": [ "new", - "existing" + "existing", + "none" ], "metadata": { "description": "Public IP for the Load Balancer for inbound and outbound data of the FortiProxy VMs" @@ -393,7 +394,7 @@ "customDataFooter": "\n--12345--\n", "serialConsoleEnabled": "[if(equals(parameters('serialConsole'),'yes'),'true','false')]", "publicIP1Name": "[if(equals(parameters('publicIP1Name'),''),concat(parameters('fortiProxyNamePrefix'),'-fpx-pip'),parameters('publicIP1Name'))]", - "publicIP1Id": "[if(equals(parameters('publicIP1NewOrExisting'),'new'),resourceId('Microsoft.Network/publicIPAddresses',variables('publicIP1Name')),resourceId(parameters('publicIP1ResourceGroup'),'Microsoft.Network/publicIPAddresses',variables('publicIP1Name')))]", + "publicIP1Id": "[if(equals(parameters('publicIP1NewOrExistingOrNone'),'new'),resourceId('Microsoft.Network/publicIPAddresses',variables('publicIP1Name')),resourceId(parameters('publicIP1ResourceGroup'),'Microsoft.Network/publicIPAddresses',variables('publicIP1Name')))]", "sn1CidrObject": "[parseCidr(parameters('subnet1Prefix'))]", "sn1Octets4": "[split(variables('sn1CidrObject').firstUsable,'.')]", "sn1IPStartAddress": "[split(parameters('subnet1StartAddress'),'.')]", @@ -705,7 +706,7 @@ } }, { - "condition": "[and(equals(parameters('publicIP1NewOrExisting'), 'new'),parameters('externalLoadBalancer'))]", + "condition": "[and(equals(parameters('publicIP1NewOrExistingOrNone'), 'new'),parameters('externalLoadBalancer'))]", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('publicIP1Name')]", "apiVersion": "2022-01-01", @@ -1053,11 +1054,11 @@ "outputs": { "fortiProxyPublicIP": { "type": "string", - "value": "[if(and(equals(parameters('publicIP1NewOrExisting'), 'new'),parameters('externalLoadBalancer')), reference(variables('publicIP1Id')).ipAddress, '')]" + "value": "[if(and(equals(parameters('publicIP1NewOrExistingOrNone'), 'new'),parameters('externalLoadBalancer')), reference(variables('publicIP1Id')).ipAddress, '')]" }, "fortiProxyFQDN": { "type": "string", - "value": "[if(and(equals(parameters('publicIP1NewOrExisting'), 'new'),parameters('externalLoadBalancer')), reference(variables('publicIP1Id')).dnsSettings.fqdn, '' )]" + "value": "[if(and(equals(parameters('publicIP1NewOrExistingOrNone'), 'new'),parameters('externalLoadBalancer')), reference(variables('publicIP1Id')).dnsSettings.fqdn, '' )]" } } } diff --git a/FortiProxy/Active-Active/test/azuredeploy.tests.ps1 b/FortiProxy/Active-Active/test/azuredeploy.tests.ps1 index 9b09a6b4..182722e5 100644 --- a/FortiProxy/Active-Active/test/azuredeploy.tests.ps1 +++ b/FortiProxy/Active-Active/test/azuredeploy.tests.ps1 @@ -111,7 +111,7 @@ Describe 'FPX A/A' { 'instanceType', 'location', 'publicIP1Name', - 'publicIP1NewOrExisting', + 'publicIP1NewOrExistingOrNone', 'publicIP1ResourceGroup', 'serialConsole', 'subnet1Name',