Commit 8b201d6
fix: retention_days validation logic for backward compatibility
The retention_days_cross_valid validation was causing 'argument must not be null'
errors in Terraform 1.6.0-1.11.4 and OpenTofu 1.6.0-1.9.3 when both min_retention_days
and max_retention_days were null (valid for standard vaults).
Changed from logical OR to conditional expression to handle null values properly:
- Returns true if either value is null (valid for standard vaults)
- Only performs min <= max comparison when both values are provided
- Maintains existing validation for air-gapped vaults via airgapped_vault_requirements_met
This ensures backward compatibility with older Terraform/OpenTofu versions while
preserving functionality for newer versions.
Fixes #281
Co-authored-by: Luis M. Gallardo D. <lgallard@users.noreply.github.com>1 parent 44e99e3 commit 8b201d6
1 file changed
+1
-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 | | |
| |||
0 commit comments