Skip to content

Commit

Permalink
FGT single: Added support for ARM64
Browse files Browse the repository at this point in the history
  • Loading branch information
jvhoof committed Jul 25, 2024
1 parent 3fd91c7 commit 95dddfb
Show file tree
Hide file tree
Showing 2 changed files with 333 additions and 269 deletions.
93 changes: 66 additions & 27 deletions FortiGate/A-Single-VM/azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"description": "Custom naming for the deployed FortiGate resources. This will override the automatic generation based on the prefix for the FortiGate name."
}
},
"fortiGateImageSKU": {
"fortiGateImageSKU_x64": {
"type": "string",
"defaultValue": "fortinet_fg-vm",
"allowedValues": [
Expand All @@ -38,19 +38,32 @@
"description": "Identifies whether to to use PAYG (on demand licensing) or BYOL license model (where license is purchased separately"
}
},
"fortiGateImageVersion": {
"fortiGateImageSKU_arm64": {
"type": "string",
"defaultValue": "7.2.8",
"defaultValue": "fortinet_fg-vm_arm64",
"allowedValues": [
"fortinet_fg-vm_arm64",
"fortinet_fg-vm_payg_2023_arm64"
],
"metadata": {
"description": "Identifies whether to to use PAYG (on demand licensing) or BYOL license model (where license is purchased separately"
}
},
"fortiGateInstanceArchitecture": {
"type": "string",
"defaultValue": "x64",
"allowedValues": [
"x64",
"arm64"
],
"metadata": {
"description": "Indicates the instance Architecture of the VM deployment. Intel/AMD or ARM"
}
},
"fortiGateImageVersion_x64": {
"type": "string",
"defaultValue": "7.4.4",
"allowedValues": [
"6.2.0",
"6.2.2",
"6.2.4",
"6.2.5",
"6.4.0",
"6.4.10",
"6.4.11",
"6.4.12",
"6.4.13",
"6.4.15",
"6.4.2",
"6.4.3",
Expand Down Expand Up @@ -94,14 +107,28 @@
"description": "Select the image version"
}
},
"fortiGateImageVersion_arm64": {
"type": "string",
"defaultValue": "7.4.4",
"allowedValues": [
"7.2.8",
"7.2.7",
"7.4.4",
"7.4.3",
"latest"
],
"metadata": {
"description": "Select the image version"
}
},
"fortiGateAdditionalCustomData": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "The ARM template provides a basic configuration. Additional configuration can be added here."
}
},
"instanceType": {
"instanceType_x64": {
"type": "string",
"defaultValue": "Standard_F2s",
"allowedValues": [
Expand Down Expand Up @@ -167,7 +194,16 @@
"Standard_D4ads_v5",
"Standard_D8ads_v5",
"Standard_D16ads_v5",
"Standard_D32ads_v5",
"Standard_D32ads_v5"
],
"metadata": {
"description": "Virtual Machine size selection - must be F4 or other instance that supports 4 NICs"
}
},
"instanceType_arm64": {
"type": "string",
"defaultValue": "Standard_D2ps_v5",
"allowedValues": [
"Standard_D2ps_v5",
"Standard_D4ps_v5",
"Standard_D8ps_v5",
Expand Down Expand Up @@ -476,7 +512,10 @@
"variables": {
"imagePublisher": "fortinet",
"imageOffer": "fortinet_fortigate-vm_v5",
"availabilitySetName": "[if(equals(parameters('existingAvailabilitySetName'),''),concat(parameters('fortiGateNamePrefix'),'-availabilityset'),parameters('existingAvailabilitySetName'))]",
"fortiGateImageSKU": "[if(equals(parameters('fortiGateInstanceArchitecture'), 'arm64'), parameters('fortiGateImageSKU_arm64'), parameters('fortiGateImageSKU_x64'))]",
"fortiGateImageVersion": "[if(equals(parameters('fortiGateInstanceArchitecture'), 'arm64'), parameters('fortiGateImageVersion_arm64'), parameters('fortiGateImageVersion_x64'))]",
"instanceType": "[if(equals(parameters('fortiGateInstanceArchitecture'), 'arm64'), parameters('instanceType_arm64'), parameters('instanceType_x64'))]",
"availabilitySetName": "[if(equals(parameters('existingAvailabilitySetName'),''),concat(parameters('fortiGateNamePrefix'),'-AvailabilitySet'),parameters('existingAvailabilitySetName'))]",
"availabilitySetId": {
"id": "[resourceId('Microsoft.Compute/availabilitySets', variables('availabilitySetName'))]"
},
Expand Down Expand Up @@ -535,14 +574,14 @@
"imageReferenceMarketplace": {
"publisher": "[variables('imagePublisher')]",
"offer": "[variables('imageOffer')]",
"sku": "[parameters('fortiGateImageSKU')]",
"version": "[parameters('FortiGateImageVersion')]"
"sku": "[variables('fortiGateImageSKU')]",
"version": "[variables('FortigateImageVersion')]"
},
"imageReferenceCustomImage": {
"id": "[parameters('customImageReference')]"
},
"virtualMachinePlan": {
"name": "[parameters('fortiGateImageSKU')]",
"name": "[variables('fortiGateImageSKU')]",
"publisher": "[variables('imagePublisher')]",
"product": "[variables('imageOffer')]"
},
Expand All @@ -554,7 +593,7 @@
},
"resources": [
{
"apiVersion": "2022-09-01",
"apiVersion": "202-01",
"name": "[concat(parameters('fortiGateNamePrefix'), '-fortinetdeployment-', uniquestring(resourceGroup().id))]",
"type": "Microsoft.Resources/deployments",
"properties": {
Expand All @@ -569,7 +608,7 @@
{
"condition": "[and(variables('useAS'),equals(parameters('existingAvailabilitySetName'),''))]",
"type": "Microsoft.Compute/availabilitySets",
"apiVersion": "2023-03-01",
"apiVersion": "2023-09-01",
"name": "[variables('availabilitySetName')]",
"location": "[parameters('location')]",
"tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Compute/availabilitySets'), union(parameters('fortinetTags'),parameters('tagsByResource')['Microsoft.Compute/availabilitySets']), parameters('fortinetTags')) ]",
Expand All @@ -585,7 +624,7 @@
"condition": "[equals(parameters('vnetNewOrExisting'), 'new')]",
"name": "[variables('vnetName')]",
"type": "Microsoft.Network/virtualNetworks",
"apiVersion": "2023-04-01",
"apiVersion": "2023-06-01",
"location": "[parameters('location')]",
"tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/virtualNetworks'), union(parameters('fortinetTags'),parameters('tagsByResource')['Microsoft.Network/virtualNetworks']), parameters('fortinetTags')) ]",
"dependsOn": [
Expand Down Expand Up @@ -626,7 +665,7 @@
"condition": "[equals(parameters('vnetNewOrExisting'), 'new')]",
"type": "Microsoft.Network/routeTables",
"name": "[variables('routeTableProtectedName')]",
"apiVersion": "2023-04-01",
"apiVersion": "2023-06-01",
"location": "[parameters('location')]",
"tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/routeTables'), union(parameters('fortinetTags'),parameters('tagsByResource')['Microsoft.Network/routeTables']), parameters('fortinetTags')) ]",
"properties": {
Expand Down Expand Up @@ -750,7 +789,7 @@
{
"type": "Microsoft.Network/networkInterfaces",
"name": "[variables('fgtNic2Name')]",
"apiVersion": "2023-04-01",
"apiVersion": "2023-06-01",
"location": "[parameters('location')]",
"tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/networkInterfaces'), union(parameters('fortinetTags'),parameters('tagsByResource')['Microsoft.Network/networkInterfaces'],variables('fastpathtag')), union(parameters('fortinetTags'),variables('fastpathtag'))) ]",
"dependsOn": [
Expand Down Expand Up @@ -782,21 +821,21 @@
{
"type": "Microsoft.Compute/virtualMachines",
"name": "[variables('fgtVmName')]",
"apiVersion": "2023-03-01",
"apiVersion": "2023-09-01",
"tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Compute/virtualMachines'), union(parameters('fortinetTags'),parameters('tagsByResource')['Microsoft.Compute/virtualMachines']), parameters('fortinetTags')) ]",
"location": "[parameters('location')]",
"identity": {
"type": "SystemAssigned"
},
"zones": "[if(variables('useAZ'), variables('zone1'), json('null'))]",
"plan": "[if(and(equals(parameters('fortiGateImageSKU'),'fortinet_fg-vm'),not(equals(parameters('customImageReference'),''))), json('null'), variables('virtualMachinePlan'))]",
"plan": "[if(and(or(equals(variables('fortiGateImageSKU'),'fortinet_fg-vm'),equals(variables('fortiGateImageSKU'),'fortinet_fg-vm_arm64')),not(equals(parameters('customImageReference'),''))), json('null'), variables('virtualMachinePlan'))]",
"dependsOn": [
"[variables('fgtNic1Id')]",
"[variables('fgtNic2Id')]"
],
"properties": {
"hardwareProfile": {
"vmSize": "[parameters('instanceType')]"
"vmSize": "[variables('instanceType')]"
},
"availabilitySet": "[if(variables('useAS'), variables('availabilitySetId'), json('null'))]",
"osProfile": {
Expand All @@ -806,7 +845,7 @@
"customData": "[variables('fgtCustomData')]"
},
"storageProfile": {
"imageReference": "[if(and(equals(parameters('fortiGateImageSKU'),'fortinet_fg-vm'),not(equals(parameters('customImageReference'),''))), variables('imageReferenceCustomImage'), variables('imageReferenceMarketplace'))]",
"imageReference": "[if(and(or(equals(variables('fortiGateImageSKU'),'fortinet_fg-vm'),equals(variables('fortiGateImageSKU'),'fortinet_fg-vm_arm64')),not(equals(parameters('customImageReference'),''))), variables('imageReferenceCustomImage'), variables('imageReferenceMarketplace'))]",
"osDisk": {
"createOption": "FromImage"
},
Expand Down
Loading

0 comments on commit 95dddfb

Please sign in to comment.