Commit bd37b64
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 38072de commit bd37b64
3 files changed
+25
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
293 | 308 | | |
294 | 309 | | |
295 | 310 | | |
| |||
| 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