Fortinet black logo

Administration Guide

Configuration resources

Configuration resources

Use the fortiflexvm_config resource to create a new FortiFlex configuration under and FortiFlex program. By using this resource, you can change the data in the FortiFlex VM Platform immediately.

Note

It may take several hours for the VMs to update their licenses automatically. To update the licenses in the VMs immediately, reboot your VMs.

Example Usage

The following is an example of using fortiflexvm_config:

resource "fortiflexvm_config" "example1"{
    product_type = "FGT_VM_Bundle"
    program_serial_number = "ELAVMS000000XXXX"
    name = "Create FGT_VM_Bundle thorugh Terraform"
    fgt_vm_bundle {
      cpu_size =  "2"
      service_pkg = "ATP"
    }
}

Argument reference

The following arguments are supported:

Argument

Type

Description

product_type

String (Required)

The product type. It must be one of the following options:

  • FAZ_VM: FortiAnalyzer Virtual Machine

  • FGT_VM_Bundle: FortiGate Virtual Machine - Service Bundle

  • FGT_VM_LCS: FortiGate Virtual Machine - A La Carte Services

  • FMG_VM: FortiManager Virtual Machine

  • FPC_VM: FortiPortal Virtual Machine

  • FWB_VM: FortiWeb Virtual Machine - Service Bundle

program_serial_number

String (Required)

The serial number of your FortiFlex program. This serial number should start with "ELAVMR".
name

String (Required)

The name of your FortiFlex configuration.
status

String (Optional)

The configuration status. If you do not specify this argument as ACTIVE or DISABLED, the configuration status remains unchanged. The default status is ACTIVE once you create a FortiFlex configuration.
faz_vm

Block List

This block is required if product_type is FAZ_VM. See Block lists for more information.
fgt_vm_bundle

Block List

This block is required if product_type is FGT_VM_Bundle. See Block lists for more information.
fgt_vm_lcs

Block List

This block is required if product_type is FGT_VM_LCS. See Block lists for more information.
fmg_vm

Block List

This block is required if product_type is FMG_VM. See Block lists for more information.

fpc_vm

Block List

This block is required if product_type is FPC_VM. See Block lists for more information.

fwb_vm

Block List

This block is required if product_type is FWB_VM. See Block lists for more information.

Block lists

The faz_vm block contains:

Argument

Type

Description

adom_num

Number (Required)

The number of ADOMs between 0 and 1200.

daily_storage

Number (Required)

The daily storage between 5 and 8300 GB.
support_service

String (Optional)

The support service. Currently, the only available support service is FortiCare Premium ("FAZFC247"). "FAZFC247" is the default value.

The fgt_vm_bundle block contains:

Argument

Type

Description

cpu_size

String (Required)

The number of CPUs. This value can be "1", "2", "4", "8", "16", "32", or "2147483647" (unlimited).

service_pkg

String (Required)

The service package can be either "FC" (FortiCare), "UTM", "ENT" (Enterprise), or "ATP".
vdom_num

Number (Optional)

The number of VDOMs between 0 and 500. The default value is 0.

The fgt_vm_lcs block contains:

Argument

Type

Description

cloud_services

List of strings (Optional)

The cloud services this FortiGate Virtual Machine supports. The default value is an empty list. It should be a combination of:

  • "FAMS": FortiGate Cloud

  • "SWNM": SD-WAN Cloud

  • "FMGC": FortiManager Cloud

  • "AFAC": FortiAnalyzer Cloud with SOCaaS

cpu_size

String (Required)

The number of CPUs between 1 and 96.
fortiguard_services

List of strings (Optional)

The FortiGuard services this FortiGate Virtual Machine supports. The default value is an empty list. It should be a combination of:

  • "IPS": Intrusion Prevention

  • "AVDB": Advanced Malware

  • "FURL": Web & Video Filtering

  • "IOTH": IOT Detection

  • "FGSA": Security Rating

  • "ISSS": Industrial Security

support_service

String (Required)

The type of support service; either "FC247" (FortiCare 24x7) or "ASET" (FortiCare Elite).

vdom_num

Number (Optional)

The number of VDOMs between 0 and 500. The default value is 0.

The fmg_vm block contains:

Argument

Type

Description

adom_num

Number (Optional)

The number of ADOMs between 0 and 100000. The default value is 0.

managed_dev

Number (Optional)

The number of managed devices between 1 and 100000. The default value is 1.

The fpc_vm block contains:

Argument

Type

Description

managed_dev

Number (Required)

The number of managed devices between 0 and 100000.

The fwb_vm block contains:

Argument

Type

Description

cpu_size

String (Required)

The number of CPUs. The value can be "1", "2", "4", "8", or "16".

service_pkg

String (Required)

The service package; either "FWBSTD" (Standard) or "FWBADV" (Advanced).

Attribute reference

The following attribute is exported:

Attribute

Type

Description

id

String

An ID for the resource.

Importing

The FortiFlex configuration can be imported.

To import the FortiFlex configuration:
  1. Specify the program_serial_number when configuring the provider:

    provider "fortiflexvm" {
        username = "ABCDEFG"
        password = "HIJKLMN"
        import_options= toset(["program_serial_number=ELAVMS000000XXXX"])
    }
  2. Import the FortiFlex configuration:

    terraform import fortiflexvm_config.labelname {{id}}

Configuration resources

Use the fortiflexvm_config resource to create a new FortiFlex configuration under and FortiFlex program. By using this resource, you can change the data in the FortiFlex VM Platform immediately.

Note

It may take several hours for the VMs to update their licenses automatically. To update the licenses in the VMs immediately, reboot your VMs.

Example Usage

The following is an example of using fortiflexvm_config:

resource "fortiflexvm_config" "example1"{
    product_type = "FGT_VM_Bundle"
    program_serial_number = "ELAVMS000000XXXX"
    name = "Create FGT_VM_Bundle thorugh Terraform"
    fgt_vm_bundle {
      cpu_size =  "2"
      service_pkg = "ATP"
    }
}

Argument reference

The following arguments are supported:

Argument

Type

Description

product_type

String (Required)

The product type. It must be one of the following options:

  • FAZ_VM: FortiAnalyzer Virtual Machine

  • FGT_VM_Bundle: FortiGate Virtual Machine - Service Bundle

  • FGT_VM_LCS: FortiGate Virtual Machine - A La Carte Services

  • FMG_VM: FortiManager Virtual Machine

  • FPC_VM: FortiPortal Virtual Machine

  • FWB_VM: FortiWeb Virtual Machine - Service Bundle

program_serial_number

String (Required)

The serial number of your FortiFlex program. This serial number should start with "ELAVMR".
name

String (Required)

The name of your FortiFlex configuration.
status

String (Optional)

The configuration status. If you do not specify this argument as ACTIVE or DISABLED, the configuration status remains unchanged. The default status is ACTIVE once you create a FortiFlex configuration.
faz_vm

Block List

This block is required if product_type is FAZ_VM. See Block lists for more information.
fgt_vm_bundle

Block List

This block is required if product_type is FGT_VM_Bundle. See Block lists for more information.
fgt_vm_lcs

Block List

This block is required if product_type is FGT_VM_LCS. See Block lists for more information.
fmg_vm

Block List

This block is required if product_type is FMG_VM. See Block lists for more information.

fpc_vm

Block List

This block is required if product_type is FPC_VM. See Block lists for more information.

fwb_vm

Block List

This block is required if product_type is FWB_VM. See Block lists for more information.

Block lists

The faz_vm block contains:

Argument

Type

Description

adom_num

Number (Required)

The number of ADOMs between 0 and 1200.

daily_storage

Number (Required)

The daily storage between 5 and 8300 GB.
support_service

String (Optional)

The support service. Currently, the only available support service is FortiCare Premium ("FAZFC247"). "FAZFC247" is the default value.

The fgt_vm_bundle block contains:

Argument

Type

Description

cpu_size

String (Required)

The number of CPUs. This value can be "1", "2", "4", "8", "16", "32", or "2147483647" (unlimited).

service_pkg

String (Required)

The service package can be either "FC" (FortiCare), "UTM", "ENT" (Enterprise), or "ATP".
vdom_num

Number (Optional)

The number of VDOMs between 0 and 500. The default value is 0.

The fgt_vm_lcs block contains:

Argument

Type

Description

cloud_services

List of strings (Optional)

The cloud services this FortiGate Virtual Machine supports. The default value is an empty list. It should be a combination of:

  • "FAMS": FortiGate Cloud

  • "SWNM": SD-WAN Cloud

  • "FMGC": FortiManager Cloud

  • "AFAC": FortiAnalyzer Cloud with SOCaaS

cpu_size

String (Required)

The number of CPUs between 1 and 96.
fortiguard_services

List of strings (Optional)

The FortiGuard services this FortiGate Virtual Machine supports. The default value is an empty list. It should be a combination of:

  • "IPS": Intrusion Prevention

  • "AVDB": Advanced Malware

  • "FURL": Web & Video Filtering

  • "IOTH": IOT Detection

  • "FGSA": Security Rating

  • "ISSS": Industrial Security

support_service

String (Required)

The type of support service; either "FC247" (FortiCare 24x7) or "ASET" (FortiCare Elite).

vdom_num

Number (Optional)

The number of VDOMs between 0 and 500. The default value is 0.

The fmg_vm block contains:

Argument

Type

Description

adom_num

Number (Optional)

The number of ADOMs between 0 and 100000. The default value is 0.

managed_dev

Number (Optional)

The number of managed devices between 1 and 100000. The default value is 1.

The fpc_vm block contains:

Argument

Type

Description

managed_dev

Number (Required)

The number of managed devices between 0 and 100000.

The fwb_vm block contains:

Argument

Type

Description

cpu_size

String (Required)

The number of CPUs. The value can be "1", "2", "4", "8", or "16".

service_pkg

String (Required)

The service package; either "FWBSTD" (Standard) or "FWBADV" (Advanced).

Attribute reference

The following attribute is exported:

Attribute

Type

Description

id

String

An ID for the resource.

Importing

The FortiFlex configuration can be imported.

To import the FortiFlex configuration:
  1. Specify the program_serial_number when configuring the provider:

    provider "fortiflexvm" {
        username = "ABCDEFG"
        password = "HIJKLMN"
        import_options= toset(["program_serial_number=ELAVMS000000XXXX"])
    }
  2. Import the FortiFlex configuration:

    terraform import fortiflexvm_config.labelname {{id}}