netascode / terraform-provider-fmc

Mozilla Public License 2.0
1 stars 3 forks source link

fmc_access_control_policy: add categories, rules as ordered lists #40

Open jabielecki opened 2 weeks ago

jabielecki commented 2 weeks ago

The processing of rules:

  1. The rules originate directly from a user-provided ordered list, such as netascode yaml.
  2. What representation to use during internal processing?
  3. The rules must go to POST as an ordered list. This is a limitation of the API: it seems that re-ordering rules without DELETE/POST is not possible.

The intention of this change is to retain an ordered list throughout point 2 (throughout the internal processing). On previous provider DAG of tf resources was used during point 2, which led to this user-facing problem. Graph is naturally hard to convert into ordered list.

Exactly the same rationale/behavior/limitation applies to categories.

~Prototype quality, the validation code is not yet ready for serious testing.~ Ready now.