Created on
06-07-2023
12:52 AM
Edited on
12-18-2025
01:13 AM
By
Jean-Philippe_P
This article describes the application of Terraform on FortiManager. Terraform is an open-source tool for the provisioning of devices and is applicable to FortiManager as well.
FortiManager.
Terraform can be installed on multiple platforms, including Linux, macOS, and Windows. Links are provided below:
Note:
Use the command below to check that Terraform is installed successfully:
terraform - - version
Enable JSON RPC read-write on admin users:
Go to FortiManager -> System Setting -> Admin -> Administrators -> Edit the user -> Select Read-Write on JSON API Access.
Create a file with .tf for Terraform:
Configure the .tf for Terraform to apply the configuration on FortiManager:
Notes:
Terraform command for FortiManager can be found in the link below:
After all the commands are configured, execute the Terraform CLI command in the terminal with the sequence below:
Terraform init will initiate the provider and plugin for FortiManager:
Terraform plan.
Terraform plan will preview the changes or configuration performed on FortiManager:
Terraform apply.
Terraform apply will perform the changes or configuration on the FortiManager.
After 3 of the actions above are successful, the configuration will be applied on FortiManager:
Related documents:
Technical Tip: Using Terraform with FortiManager and FortiAnalyzer Cloud
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2026 Fortinet, Inc. All Rights Reserved.