Skip to content

Commit

Permalink
FGT AP: customvhd - ARM64
Browse files Browse the repository at this point in the history
  • Loading branch information
jvhoof committed Mar 23, 2023
1 parent fd82f62 commit a2610f1
Show file tree
Hide file tree
Showing 2 changed files with 114 additions and 34 deletions.
85 changes: 53 additions & 32 deletions FortiGate/Active-Passive-ELB-ILB/azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,25 @@
"Standard_D32as_v5",
"Standard_D8ads_v5",
"Standard_D16ads_v5",
"Standard_D32ads_v5"
"Standard_D32ads_v5",
"Standard_D8ps_v5",
"Standard_D16ps_v5",
"Standard_D32ps_v5",
"Standard_D8pds_v5",
"Standard_D16pds_v5",
"Standard_D32pds_v5",
"Standard_D8pls_v5",
"Standard_D16pls_v5",
"Standard_D32pls_v5",
"Standard_D8plds_v5",
"Standard_D16plds_v5",
"Standard_D32plds_v5",
"Standard_E8ps_v5",
"Standard_E16ps_v5",
"Standard_E32ps_v5",
"Standard_E8pds_v5",
"Standard_E16pds_v5",
"Standard_E32pds_v5"
],
"metadata": {
"description": "Virtual Machine size selection - must be F4 or other instance that supports 4 NICs"
Expand Down Expand Up @@ -419,6 +437,13 @@
"description": "Secondary FortiGate BYOL Flex-VM license token"
}
},
"customImageReference": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "By default, the deployment will use Azure Marketplace images. In specific cases, using BYOL custom FortiGate images can be deployed. This requires a reference "
}
},
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]",
Expand All @@ -442,14 +467,6 @@
"availabilitySetId": {
"id": "[resourceId('Microsoft.Compute/availabilitySets', variables('availabilitySetName'))]"
},
"useAZ": "[and(not(empty(pickZones('Microsoft.Compute', 'virtualMachines', parameters('location')))), equals(parameters('availabilityOptions'), 'Availability Zones'))]",
"pipZones": "[if(variables('useAZ'), pickZones('Microsoft.Network', 'publicIPAddresses', parameters('location'), 3), json('null'))]",
"zone1": [
"1"
],
"zone2": [
"2"
],
"vnetName": "[if(equals(parameters('vnetName'),''),concat(parameters('fortiGateNamePrefix'),'-VNET'),parameters('vnetName'))]",
"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')))]",
"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')))]",
Expand Down Expand Up @@ -564,7 +581,29 @@
"externalLBBEName": "[concat(parameters('fortiGateNamePrefix'),'-ELB-',parameters('subnet1Name'),'-BackEnd')]",
"externalLBBEId": "[resourceID('Microsoft.Network/loadBalancers/backendAddressPools/',variables('externalLBName'),variables('externalLBBEName'))]",
"externalLBProbeName": "lbprobe",
"externalLBProbeId": "[resourceId('Microsoft.Network/loadBalancers/probes/',variables('externalLBName'),variables('externalLBProbeName'))]"
"externalLBProbeId": "[resourceId('Microsoft.Network/loadBalancers/probes/',variables('externalLBName'),variables('externalLBProbeName'))]",
"useAZ": "[and(not(empty(pickZones('Microsoft.Compute', 'virtualMachines', parameters('location')))), equals(parameters('availabilityOptions'), 'Availability Zones'))]",
"pipZones": "[if(variables('useAZ'), pickZones('Microsoft.Network', 'publicIPAddresses', parameters('location'), 3), json('null'))]",
"zone1": [
"1"
],
"zone2": [
"2"
],
"imageReferenceMarketplace": {
"publisher": "[variables('imagePublisher')]",
"offer": "[variables('imageOffer')]",
"sku": "[parameters('fortiGateImageSKU')]",
"version": "[parameters('FortigateImageVersion')]"
},
"imageReferenceCustomImage": {
"id": "[parameters('customImageReference')]"
},
"virtualMachinePlan": {
"name": "[parameters('fortiGateImageSKU')]",
"publisher": "[variables('imagePublisher')]",
"product": "[variables('imageOffer')]"
}
},
"resources": [
{
Expand Down Expand Up @@ -1211,11 +1250,7 @@
"type": "SystemAssigned"
},
"zones": "[if(variables('useAZ'), variables('zone1'), json('null'))]",
"plan": {
"name": "[parameters('fortiGateImageSKU')]",
"publisher": "[variables('imagePublisher')]",
"product": "[variables('imageOffer')]"
},
"plan": "[if(and(equals(parameters('fortiGateImageSKU'),'fortinet_fg-vm'),not(equals(parameters('customImageReference'),''))), json('null'), variables('virtualMachinePlan'))]",
"dependsOn": [
"[variables('fgaNic1Id')]",
"[variables('fgaNic2Id')]",
Expand All @@ -1234,12 +1269,7 @@
"customData": "[variables('fgaCustomData')]"
},
"storageProfile": {
"imageReference": {
"publisher": "[variables('imagePublisher')]",
"offer": "[variables('imageOffer')]",
"sku": "[parameters('fortiGateImageSKU')]",
"version": "[parameters('fortiGateImageVersion')]"
},
"imageReference": "[if(and(equals(parameters('fortiGateImageSKU'),'fortinet_fg-vm'),not(equals(parameters('customImageReference'),''))), variables('imageReferenceCustomImage'), variables('imageReferenceMarketplace'))]",
"osDisk": {
"createOption": "FromImage"
},
Expand Down Expand Up @@ -1298,11 +1328,7 @@
"type": "SystemAssigned"
},
"zones": "[if(variables('useAZ'), variables('zone2'), json('null'))]",
"plan": {
"name": "[parameters('fortiGateImageSKU')]",
"publisher": "[variables('imagePublisher')]",
"product": "[variables('imageOffer')]"
},
"plan": "[if(and(equals(parameters('fortiGateImageSKU'),'fortinet_fg-vm'),not(equals(parameters('customImageReference'),''))), json('null'), variables('virtualMachinePlan'))]",
"dependsOn": [
"[variables('fgbNic1Id')]",
"[variables('fgbNic2Id')]",
Expand All @@ -1321,12 +1347,7 @@
"customData": "[variables('fgbCustomData')]"
},
"storageProfile": {
"imageReference": {
"publisher": "[variables('imagePublisher')]",
"offer": "[variables('imageOffer')]",
"sku": "[parameters('fortiGateImageSKU')]",
"version": "[parameters('fortiGateImageVersion')]"
},
"imageReference": "[if(and(equals(parameters('fortiGateImageSKU'),'fortinet_fg-vm'),not(equals(parameters('customImageReference'),''))), variables('imageReferenceCustomImage'), variables('imageReferenceMarketplace'))]",
"osDisk": {
"createOption": "FromImage"
},
Expand Down
63 changes: 61 additions & 2 deletions FortiGate/Active-Passive-ELB-ILB/createUiDefinition.json
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,25 @@
"Standard_D32as_v5",
"Standard_D8ads_v5",
"Standard_D16ads_v5",
"Standard_D32ads_v5"
"Standard_D32ads_v5",
"Standard_D8ps_v5",
"Standard_D16ps_v5",
"Standard_D32ps_v5",
"Standard_D8pds_v5",
"Standard_D16pds_v5",
"Standard_D32pds_v5",
"Standard_D8pls_v5",
"Standard_D16pls_v5",
"Standard_D32pls_v5",
"Standard_D8plds_v5",
"Standard_D16plds_v5",
"Standard_D32plds_v5",
"Standard_E8ps_v5",
"Standard_E16ps_v5",
"Standard_E32ps_v5",
"Standard_E8pds_v5",
"Standard_E16pds_v5",
"Standard_E32pds_v5"
]
},
"options": {
Expand Down Expand Up @@ -1014,6 +1032,46 @@
}
}
]
},
{
"name": "customvhd",
"type": "Microsoft.Common.Section",
"label": "Custom VHD",
"elements": [
{
"name": "customvhdinfo",
"type": "Microsoft.Common.InfoBox",
"visible": true,
"options": {
"icon": "Info",
"text": "For BYOL it is possible to upload a specific FortiGate image to Azure provided by support. Provide the resource ID of the required VM image version in the field below.",
"uri": "https://docs.fortinet.com/document/fortigate-public-cloud/7.2.0/azure-administration-guide/392531/deploying-fortigate-vm-from-a-vhd-image-file"
}
},
{
"name": "resourceid",
"type": "Microsoft.Common.TextBox",
"label": "Azure Compute Gallery Image Version resource ID",
"defaultValue": "",
"toolTip": "Azure Compute Gallery Image Version resource ID",
"constraints": {
"required": "[and(contains(steps('instance').instancetype.selection, 'p'),equals(basics('fortiGateImageSKU'),'fortinet_fg-vm'))]",
"regex": "^[\\w\\W\n\t]{0,10240}$",
"validationMessage": "All characters allowed, max 10240 characters."
},
"visible": "[equals(basics('fortiGateImageSKU'),'fortinet_fg-vm')]"
},
{
"name": "customvhdinfo2",
"type": "Microsoft.Common.InfoBox",
"visible": "[contains(steps('instance').instancetype.selection, 'p')]",
"options": {
"icon": "Info",
"text": "An ARM64 based instance type was selected. This requires a custom image using an Azure Compute Gallery.",
"uri": "https://docs.fortinet.com/document/fortigate-public-cloud/7.2.0/azure-administration-guide/392531/deploying-fortigate-vm-from-a-vhd-image-file"
}
}
]
}
]
}
Expand Down Expand Up @@ -1063,7 +1121,8 @@
"fortiManager": "[steps('advanced').fortimanager.enabled]",
"fortiManagerIP": "[steps('advanced').fortimanager.fortimanagerip]",
"fortiManagerSerial": "[steps('advanced').fortimanager.fortimanagerserial]",
"fortiGateAdditionalCustomData": "[steps('advanced').customdata.config]"
"fortiGateAdditionalCustomData": "[steps('advanced').customdata.config]",
"customImageReference": "[steps('advanced').customvhd.resourceid]"
}
}
}

0 comments on commit a2610f1

Please sign in to comment.