Group data sources
There are a couple of FortiFlex group data sources:
fortiflexvm_groups_list
Use the fortiflexvm_groups_list
data source to get a list of FortiFlex groups. The data source returns a list of asset folders that have FortiFlex products in them.
Example usage
The following is an example usage of fortiflexvm_groups_list
:
data "fortiflexvm_groups_list" "example" { } output "my_groups_list"{ value = data.fortiflexvm_groups_list.example }
Argument reference
There is no argument required.
Attribute reference
The following attributes are exported:
Attribute |
Type |
Description |
---|---|---|
|
List of objects |
The list of groups. |
id
|
String |
An ID for the resource. |
The groups
block contains:
Attribute |
Type |
Description |
---|---|---|
|
Number |
The number of available tokens in the group. |
folder_path
|
String |
The folder path of the group. |
|
Number |
The number of tokens used in the group. |
fortiflexvm_groups_nexttoken
Use the fortiflexvm_groups_nexttoken
data source to get the next available, unused token. The data source returns the first available token by asset folder or configuration ID.
Example usage
The following is an example usage of fortiflexvm_groups_nexttoken
:
data "fortiflexvm_groups_nexttoken" "example" { config_id = 42 folder_path = "My Assets" } output "output1"{ value = data.fortiflexvm_groups_nexttoken.example }
Argument reference
The following arguments are supported:
Argument |
Type |
Description |
---|---|---|
|
Number (Optional) |
The ID of a FortiFlex configuration. |
folder_path
|
String (Optional) |
The folder path. |
Although both arguments are optional, you must specify at least one argument to get the result. |
Attribute reference
The following attributes are exported:
Attribute |
Type |
Description |
---|---|---|
|
String |
An ID for the resource. |
vms
|
List of objects |
One Virtual Machine with an unused token. |
The vms
block contains:
Attribute |
Type |
Description |
---|---|---|
|
Number |
The ID of the FortiFlex configuration that this VM used. |
description
|
String |
The description of the VM. |
|
String |
The VM end date. |
|
String |
The unique serial number of the VM. |
|
String |
The VM creation date. |
|
String |
The VM status, which can be |
|
String |
The VM token. |
|
String |
The status of the VM token, which can be |