Commit d6a6d1f
committed
refactor: improve retention_days_cross_valid clarity and add version compatibility docs
This commit builds on the fix from PR #283 with two improvements:
1. Clarify validation logic in main.tf:20
- Change from: (var.min_retention_days == null || var.max_retention_days == null) ? true : ...
- Change to: (var.min_retention_days != null && var.max_retention_days != null) ? (...) : true
- This explicit ternary pattern makes intent clearer: "compare only when both non-null"
- Improves code readability and maintainability for future developers
- Logically equivalent to original fix, with improved clarity
2. Document version compatibility in versions.tf
- Add comments explaining tested Terraform versions (1.3.0 - 1.11.4+)
- Add comments explaining tested OpenTofu versions (1.6.0 - 1.9.3+)
- Document the null handling issue fixed in main.tf
- Help users understand version support boundaries
These improvements maintain all existing functionality while enhancing code clarity
and providing better documentation for future maintainers.1 parent 8b201d6 commit d6a6d1f
2 files changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
1 | 10 | | |
2 | 11 | | |
3 | 12 | | |
| |||
0 commit comments