terraform-provider-fortios
terraform-provider-fortios copied to clipboard
How to reorder shaping policies
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!
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
Thanks Xing, Are the any plans to create resources like policyseq and policysort for other resource types (sdwan, traffic shaping for example)? Cheers
Hi @gmintoco ,
Sorry that, we do not plan to create resources for other resource types.
Thanks, Xing
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
Hi @gmintoco ,
Thank you for your request. We will consider it.
Please let me know if you have any questions.
Thanks, Xing
That was all thanks for considering :)
@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?
Hi @timwsuqld,
Thank you for raising this request. Sure, no problem. I have reopened this issue.
Thanks, Xing
Hi @lix-fortinet,
Are there any updates on this request?
Thanks.