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:
- Update the FortiGate image version using the
image_versionvariable under thefortigate_scalesetsection 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. - After updating the terraform.tfvars file, run
terraform applyto deploy the changes. - Before applying changes in a production environment, test the upgrade process in a staging environment to validate compatibility and minimize potential disruptions.
|
|
If you update the |
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:
- Download the latest cloud function code file.
- Replace the existing files at
/modules/fortigate/scaleset/function_app.zip. - Rerun
terraform applyto 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:
- 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 } ``` - Run the following commands to upgrade and apply the changes:
``` terraform init -upgrade terraform apply ```