fortinetdev / terraform-provider-fortimanager

Mozilla Public License 2.0
10 stars 9 forks source link

fortimanager_packages_firewall_policy_move resource refresh extremely slow with a high number of policy #25

Closed eltchao closed 1 year ago

eltchao commented 2 years ago

Hi,

I have enabled policy ordering through terraform using the fortimanager_packages_firewall_policy_move resource.

While this worked well in my dev platform (with a limited number of policies), the refresh of those resources is extremelly slow in Production (about 200 policies - so 200 move resource) - more than 10s for each.

I enabled the Terraform logs to understand what was happening. My understanding from the log is that the terraform provider download the full list of policy for each move resource refresh. Making the time to refresh those resource grow exponentially as the number of policies grows.

Thank you,

lix-fortinet commented 2 years ago

Hi @eltchao,

Thank you for raising this issue. Team are working on this issue. We will get back to you once we have any updates.

Thanks, Xing

lix-fortinet commented 1 year ago

Hi @eltchao,

We make some improvements for this issue. Could you try the latest version of FortiManager Terraform provider v1.6.0 to see whether the performance is better?

Thanks, Xing

eltchao commented 1 year ago

I tested it and it's like night and day. The problem is solved. Thank you !