fortinetdev / terraform-provider-fortimanager

Mozilla Public License 2.0
10 stars 9 forks source link

Proposal: Split fortimanager_object_fmg_variable into Two Separate Resources #54

Open Almujalled opened 2 months ago

Almujalled commented 2 months ago

Description

Currently, the fortimanager_object_fmg_variable resource in our Terraform module is responsible for both creating variables with default values and performing variable-to-device dynamic mapping. This dual responsibility can limit flexibility for users who may want to manage these two aspects separately.

Proposal

I propose that we split fortimanager_object_fmg_variable into two separate resources:

  1. fortimanager_object_fmg_variable: This resource would be responsible for creating variables with default values. It would take a list of variables as input, each with a name and default value.

  2. fortimanager_object_fmg_variable_mapping: This resource would be responsible for performing dynamic mapping. It would take a list of mappings as input, each with a variable name, device name, and value.

By splitting fortimanager_object_fmg_variable into these two resources, we can provide users with more flexibility to manage their FortiManager configuration. Users could choose to use both resources together, as they do now, or use them separately if they only need to manage variables or dynamic mappings.

I look forward to hearing your thoughts on this proposal.

MaxxLiu22 commented 2 months ago

Hi @Almujalled ,

Thank you for bringing this issue to our attention. We previously supported fortimanager_object_fmg_variable_dynamic_mapping, but it was removed because the resource did not pass our release tests. We are currently testing this resource internally and hope to include it in our Terraform provider soon. We appreciate your patience and understanding.

Thanks, Maxx