Commit a8e804b
committed
Add cloudstack_network_acl_ruleset resource with comprehensive ACL management
This commit introduces a new resource for managing network ACL rules with several
improvements over the legacy cloudstack_network_acl_rule resource.
Key Features:
- Declarative ruleset management with efficient in-place updates
- Rules identified by rule_number (natural key) instead of list position
- Eliminates spurious diffs when modifying individual rules
- Optional managed mode to delete out-of-band rules
- Concurrent rule operations with proper synchronization
- Support for protocol transitions (e.g., TCP to ICMP)
Technical Implementation:
- Uses TypeSet with Optional+Computed pattern for rules
- CustomizeDiff function to suppress spurious diffs by comparing rules via rule_number
- Three-phase update strategy: delete, update, create (preserves UUIDs)
- Managed mode uses dummy rules to track out-of-band changes
- Helper function buildRuleFromAPI() to eliminate code duplication
- Safe type assertions to prevent runtime panics
- Proper validation placement in verifyACLRuleParams
Legacy Resource Updates:
- Deprecated cloudstack_network_acl_rule with migration guidance
- Added deprecation notice to documentation
- Maintains backward compatibility
Testing:
- 12 comprehensive acceptance tests covering all scenarios
- Tests for basic CRUD, managed mode, protocol transitions, field changes
- Import functionality testing
- Spurious diff prevention verification
- All tests passing
Documentation:
- Complete user guide with multiple examples
- Clear migration path from legacy resource
- Accurate field descriptions (no unsupported features mentioned)1 parent 403bb66 commit a8e804b
File tree
7 files changed
+3690
-3188
lines changed- cloudstack
- website/docs/r
7 files changed
+3690
-3188
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
| |||
0 commit comments