Entitlement resources
There are several of FortiFlex entitlement resources:
fortiflexvm_entitlements_cloud
Use the fortiflexvm_entitlements_cloud
resource to create and update a cloud entitlement based on a configuration.
Example usage
The following is an example usage of fortiflexvm_entitlements_cloud
:
resource "fortiflexvm_config" "example"{ product_type = "FC_EMS_CLOUD" program_serial_number = "ELAVMS0000xxxxxx" name = "FC_EMS_OP_template" fc_ems_cloud { ztna_num = 225 # Value should be divisible by 25. Number between 0 and 25000 (inclusive) ztna_fgf_num = 225 # Value should be divisible by 25. Number between 0 and 25000 (inclusive) epp_ztna_num = 125 # Value should be divisible by 25. Number between 0 and 25000 (inclusive) epp_ztna_fgf_num = 125 # Value should be divisible by 25. Number between 0 and 25000 (inclusive) chromebook = 100 # Value should be divisible by 25. Number between 0 and 25000 (inclusive) addons = ["BPS"] # [] or ["BPS"] } status = "ACTIVE" } # Each account can create at most one entitlement for each cloud product. resource "fortiflexvm_entitlements_cloud" "example"{ config_id = fortiflexvm_config.example.id description = "Use v2 terraform" # Optional. end_date = "2023-12-12T00:00:00" # Optional. If not set or empty "", it will use the program's end date automatically. folder_path = "My Assets/v2" # Optional. If not set, new VM will be in "My Assets" # status = "ACTIVE" # Optional, It has many restrictions. Not recommended to set it manually. } output "new_entitlement"{ value = fortiflexvm_entitlements_cloud.example }
Argument reference
The following argument is required:
Attribute |
Type |
Description |
---|---|---|
|
Number (Optional) |
The account ID. |
|
Number (Required) |
The ID of the FortiFlex configuration. |
description
|
String (Optional) |
The description of the entitlement. |
|
String (Optional) |
The Cloud entitlement end date. Any format that satisfies ISO 8601 is accepted but the recommended format is |
folder_path
|
String (Optional) |
The folder path of the cloud entitlement. If not specified, it will be in My Assets. |
|
String (Optional) |
The entitlement status, which can be |
Attribute reference
The following attributes are exported:
Attribute |
Type |
Description |
---|---|---|
|
Number |
The account ID. |
|
String |
The ID of the resource. Its value will be |
serial_number
|
String |
The ID of the Cloud entitlement. |
|
String |
The Cloud entitlement start date in the format |
|
String |
The entitlement status, which can be |
Import
To import a cloud entitlement:
terraform import fortiflexvm_entitlements_cloud.labelname {{serial_number}}.{{config_id}} # For example: terraform import fortiflexvm_entitlements_cloud.example FEMSPO8823000143.3196
fortiflexvm_entitlements_hardware
Use the fortiflexvm_entitlements_hardware
resource to create and update a hardware entitlement based on a configuration.
Example usage
The following is an example usage of fortiflexvm_entitlements_hardware
:
resource "fortiflexvm_entitlements_hardware" "example"{ config_id = 5010 end_date = "2023-11-12T00:00:00" # Optional. If not set, it will use the program end date automatically. # status = "ACTIVE" # "ACTIVE" or "STOPPED". Optional. It has many restrictions. Not recommended to set it manually. } output "new_entitlement_hw"{ value = fortiflexvm_entitlements_hardware.example }
Argument reference
The following arguments are supported:
Attribute |
Type |
Description |
---|---|---|
|
Number (Required) |
The ID of the FortiFlex configuration. |
description
|
String (Optional) |
The description of the entitlement. |
|
String (Optional) |
The hardware entitlement end date. Any format that satisfies ISO 8601 is accepted but the recommended format is |
|
String (Optional) |
The entitlement status, which can be |
Attribute reference
The following attributes are exported:
Attribute |
Type |
Description |
---|---|---|
|
Number |
The account ID. |
|
String |
The ID of the resource. Its value will be |
serial_number
|
String |
The ID of the hardware entitlement. |
|
String |
The hardware entitlement start date in the format |
|
String |
The entitlement status, which can be |
Import
To import a hardware entitlement:
terraform import fortiflexvm_entitlements_hardware.labelname {{serial_number}}.{{config_id}} # For example: terraform import fortiflexvm_entitlements_hardware.example FGT70FTK22000001.5010
fortiflexvm_entitlements_vm
Use the fortiflexvm_entitlements_vm
resource to create and update a VM entitlement based on a configuration.
Example usage
The following is an example usage of fortiflexvm_entitlements_vm
:
resource "fortiflexvm_entitlements_vm" "example"{ config_id = 3196 description = "Your description" # Optional. end_date = "2023-11-12T00:00:00" # Optional. If not set, it will use the program end date automatically. # folder_path = "My Assets" # Optional. If not set, new VM will be in "My Assets" # status = "ACTIVE" # "ACTIVE" or "STOPPED". Optional. It has many restrictions. Not recommended to set it manually. } output "new_entitlement"{ value = fortiflexvm_entitlements_vm.example } output "new_entitlement_token"{ value = fortiflexvm_entitlements_vm.example.token }
Argument reference
The following arguments are supported:
Attribute |
Type |
Description |
---|---|---|
|
Number (Optional) |
The account ID. |
|
Number (Required) |
The ID of the FortiFlex configuration. |
description
|
String (Optional) |
The description of the entitlement. |
|
String (Optional) |
The hardware entitlement end date. Any format that satisfies ISO 8601 is accepted but the recommended format is |
|
String (Optional) |
The folder path of the VM. If not set, the new VM will be in My Assets. |
|
String (Optional) |
The entitlement status, which can be |
Attribute reference
The following attributes are exported:
Attribute |
Type |
Description |
---|---|---|
|
Number |
The account ID. |
|
String |
The ID of the resource. Its value will be |
serial_number
|
String |
The ID of the VM entitlement. |
|
String |
The VM entitlement start date in the format |
|
String |
The entitlement status, which can be |
|
String |
The token of the VM entitlement. |
|
String |
The status of the token, either |
Import
To import a VM entitlement:
terraform import fortiflexvm_entitlements_vm.labelname {{serial_number}}.{{config_id}} # For example: terraform import fortiflexvm_entitlements_vm.example FGVMMLTM23001273.3196
fortiflexvm_entitlements_vm_token
Use the fortiflexvm_entitlements_vm_token
resource to regenerate a token for a VM.
Example usage
The following is an example usage of fortiflexvm_entitlements_vm_token
:
resource "fortiflexvm_entitlements_vm_token" "example"{ config_id = 3196 serial_number = "FGVMMLTM23001325" regenerate_token = true # If set as false, the provider would only provide the token and not regenerate the token. } output "entitlement_token"{ value = fortiflexvm_entitlements_vm_token.example.token }
Argument reference
The following arguments are supported:
Attribute |
Type |
Description |
---|---|---|
|
Number (Required) |
The ID of the FortiFlex configuration. |
serial_number
|
String (Required) |
The ID of the VM entitlement. |
|
Boolean (Required) |
Determines whether to regenerate a token or not. When it is |
Attribute reference
The following attributes are exported:
Attribute |
Type |
Description |
---|---|---|
|
Number |
The account ID. |
|
String |
The ID of the resource. Its value will be |
|
String |
The token of the VM entitlement. |
|
String |
The status of the token, either |
Import
To import a VM token:
terraform import fortiflexvm_entitlements_vm_token.labelname {{serial_number}}.{{config_id}} # For example: terraform import fortiflexvm_entitlements_vm_token.example FGVMMLTM23001325.3196