Fortinet white logo
Fortinet white logo

Azure Administration Guide

Appendix - Upgrading FortiGate ASG best practices

Appendix - Upgrading FortiGate ASG best practices

Upgrading the FortiGate image version in an Azure virtual machine scale set (VMSS) is supported. Review the following considerations and steps to ensure a smooth upgrade process.

Upgrading the FortiGate image version

To upgrade the FortiGate image version:
  1. Update the FortiGate image version using the image_version variable under the fortigate_scaleset section of your terraform.tfvars file. The rule is for the module to get the latest version of the FortiGate on AWS. This change ensures that all newly launched VM instances use the updated image version. Existing VM instances continue to run the previous image version.
  2. After updating the terraform.tfvars file, run terraform apply to deploy the changes.
  3. Before applying changes in a production environment, test the upgrade process in a staging environment to validate compatibility and minimize potential disruptions.
Note

If you update the image_version variable after deployment, the updated version only applies to new instances launched after the update. Existing instances are not updated, since the module updates the ASG template and not the existing instances.

Upgrading the cloud function

The cloud function is continuously updated to support new features and improvements. To benefit from these updates, you can upgrade the cloud function code using one of the following methods.

If using a local copy of the project

If you cloned or downloaded the source code locally using the terraform.tfvars file for deployment, you can manually update the cloud function code.

To upgrade the cloud function when using a local copy of the project:
  1. Download the latest cloud function code file.
  2. Replace the existing files at /modules/fortigate/scaleset/function_app.zip.
  3. Rerun terraform apply to deploy the updated function.

If using the project as a module

If you are using this project as a module, for example, by creating your own main.tf file and including the following block:

Example (initial use without version pinning):
```
module "applb_gwlb_fgtasg" {
    source = "fortinetdev/cloud-modules/azurerm//examples/applb_gwlb_fgtasg"

    
# other parameters
}
```

Terraform fetches the latest available version at the time of the first terraform init. However, this version is locked in your .terraform.lock.hcl file and does not automatically update, even if newer versions become available.

To ensure you are using a specific version or to upgrade to a newer version, explicitly specify the version attribute in your module block.

To upgrade to a newer version when using the project as a module:
  1. Update the version field to the desired version number. See the following example:
    module "applb_gwlb_fgtasg" {
        source = "fortinetdev/cloud-modules/azurerm//examples/applb_gwlb_fgtasg"
        version = "1.0.3" # <-- Update this to a new version
    
        
    # other parameters
    }
    ```
  2. Run the following commands to upgrade and apply the changes:
    ```
    terraform init -upgrade
    terraform apply
    ```

Appendix - Upgrading FortiGate ASG best practices

Appendix - Upgrading FortiGate ASG best practices

Upgrading the FortiGate image version in an Azure virtual machine scale set (VMSS) is supported. Review the following considerations and steps to ensure a smooth upgrade process.

Upgrading the FortiGate image version

To upgrade the FortiGate image version:
  1. Update the FortiGate image version using the image_version variable under the fortigate_scaleset section of your terraform.tfvars file. The rule is for the module to get the latest version of the FortiGate on AWS. This change ensures that all newly launched VM instances use the updated image version. Existing VM instances continue to run the previous image version.
  2. After updating the terraform.tfvars file, run terraform apply to deploy the changes.
  3. Before applying changes in a production environment, test the upgrade process in a staging environment to validate compatibility and minimize potential disruptions.
Note

If you update the image_version variable after deployment, the updated version only applies to new instances launched after the update. Existing instances are not updated, since the module updates the ASG template and not the existing instances.

Upgrading the cloud function

The cloud function is continuously updated to support new features and improvements. To benefit from these updates, you can upgrade the cloud function code using one of the following methods.

If using a local copy of the project

If you cloned or downloaded the source code locally using the terraform.tfvars file for deployment, you can manually update the cloud function code.

To upgrade the cloud function when using a local copy of the project:
  1. Download the latest cloud function code file.
  2. Replace the existing files at /modules/fortigate/scaleset/function_app.zip.
  3. Rerun terraform apply to deploy the updated function.

If using the project as a module

If you are using this project as a module, for example, by creating your own main.tf file and including the following block:

Example (initial use without version pinning):
```
module "applb_gwlb_fgtasg" {
    source = "fortinetdev/cloud-modules/azurerm//examples/applb_gwlb_fgtasg"

    
# other parameters
}
```

Terraform fetches the latest available version at the time of the first terraform init. However, this version is locked in your .terraform.lock.hcl file and does not automatically update, even if newer versions become available.

To ensure you are using a specific version or to upgrade to a newer version, explicitly specify the version attribute in your module block.

To upgrade to a newer version when using the project as a module:
  1. Update the version field to the desired version number. See the following example:
    module "applb_gwlb_fgtasg" {
        source = "fortinetdev/cloud-modules/azurerm//examples/applb_gwlb_fgtasg"
        version = "1.0.3" # <-- Update this to a new version
    
        
    # other parameters
    }
    ```
  2. Run the following commands to upgrade and apply the changes:
    ```
    terraform init -upgrade
    terraform apply
    ```