PaloAltoNetworks / terraform-provider-panos

Terraform Panos provider
https://www.terraform.io/docs/providers/panos/
Mozilla Public License 2.0
87 stars 69 forks source link

panos_security_rule_group should not reorder every rule upon update #378

Open freedge opened 1 year ago

freedge commented 1 year ago

Is your feature request related to a problem?

related to a problem: upon any update of a panos_security_rule_group, there is 1 action=move sent for each rule present in the group. For large groups, this generate thousands of requests, sent one after another, which is unnecessary slow and expensive.

Describe the solution you'd like

there should only be move actions when needed so either

Describe alternatives you've considered

I am considering implementing that last option, playing with

https://github.com/PaloAltoNetworks/pango/blob/dba4c1566648dbf17471e4cae313d7ebe1846b68/poli/security/pano.go#L133

the alternative we found is to live with the slowness..

Additional context

Discovered terraform apply was stuck waiting for modifications to complete in panorama and found all these calls. We do not care about the order of the rules within the panos_security_rule_group so all these moves seem useless.