Explicit priority on rules and policies
#8
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem. Policy evaluation is "in order; first match wins", but HCL
resources are unordered and
tomswallapi_ruleexposes no priority field.Where two rules overlap (one shadows the other), the effective policy depends
on server-assigned ordering — which can silently change on unrelated applies.
For a firewall, nondeterministic rule order is a correctness bug, not a
papercut.
Proposal.
priority(int) ontomswallapi_ruleand the future policyresource; compiler sorts by it.
picking one.
stable across recompiles.