terraform-provider-fortios icon indicating copy to clipboard operation
terraform-provider-fortios copied to clipboard

How to reorder shaping policies

Open gmintoco opened this issue 4 years ago • 9 comments

When creating shaping policies with the provider: https://registry.terraform.io/providers/fortinetdev/fortios/latest/docs/resources/fortios_firewall_shapingpolicy

How do we reorder these policies similar to: https://registry.terraform.io/providers/fortinetdev/fortios/latest/docs/resources/fortios_firewall_security_policyseq

or https://registry.terraform.io/providers/fortinetdev/fortios/latest/docs/resources/fortios_firewall_security_policysort

The order matters with shaping policies (of course) so being able to reorder them seems quite important. Looking forward to hearing back. Thanks a lot!

gmintoco avatar Sep 14 '21 16:09 gmintoco

Hi @gmintoco ,

Thank you for raising this issue. This link has the details of how to move a policy: https://registry.terraform.io/providers/fortinetdev/fortios/latest/docs/guides/fgt_policymove

Please let me know if you have any questions.

Thanks, Xing

lix-fortinet avatar Sep 15 '21 00:09 lix-fortinet

Thanks Xing, Are the any plans to create resources like policyseq and policysort for other resource types (sdwan, traffic shaping for example)? Cheers

gmintoco avatar Sep 15 '21 08:09 gmintoco

Hi @gmintoco ,

Sorry that, we do not plan to create resources for other resource types.

Thanks, Xing

lix-fortinet avatar Sep 15 '21 20:09 lix-fortinet

Hi @lix-fortinet

is their a process for feature requests? This kind of functionality would be useful because as far as I can see the generic json api resource does not support maintaining state. IE if the policies are manually moved it won't check if they are in the correct order.

There are many kinds of order-based policies in FortiGate (as I'm sure you know) and being able to configure them in a way that ensures state would be extremely useful.

I hope you consider adding these resources to the provider. Thanks, Gus

gmintoco avatar Sep 16 '21 15:09 gmintoco

Hi @gmintoco ,

Thank you for your request. We will consider it.

Please let me know if you have any questions.

Thanks, Xing

lix-fortinet avatar Sep 17 '21 21:09 lix-fortinet

That was all thanks for considering :)

gmintoco avatar Jan 31 '22 08:01 gmintoco

@lix-fortinet Given that we have fortios_firewall_security_policyseq it would be great to get this for more than just security policies. Shaper policies order matters as well. fortios_json_generic_api just isn't the right way to do this in terraform, it's hacky and doesn't have state, so will always try and make the change even when not needed.

Can we reopen this issue for future consideration?

timwsuqld avatar Mar 30 '22 07:03 timwsuqld

Hi @timwsuqld,

Thank you for raising this request. Sure, no problem. I have reopened this issue.

Thanks, Xing

lix-fortinet avatar Mar 30 '22 17:03 lix-fortinet

Hi @lix-fortinet,

Are there any updates on this request?

Thanks.

zippanto avatar Feb 28 '24 09:02 zippanto