-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Overview
When the "Incident history limit" in the StatusPal management dashboard's status page settings is set to "No Limit", running terraform import imports the following value:
history_limit_days = 0
Subsequently, running terraform plan produces the following error:
Attribute status_page.history_limit_days value must be one of: ["30" "90" "365"], got: 0
Details
-
Expected Behavior:
- Terraform should correctly process the "No Limit" setting, either omitting
history_limit_daysor interpreting it appropriately as "No Limit" so that the plan runs successfully without errors.
- Terraform should correctly process the "No Limit" setting, either omitting
-
Actual Behavior:
- After running
terraform import,history_limit_days = 0is imported. - When running
terraform plan, the above error is raised, causing the plan to fail.
- After running
According to the official documentation, the "No Limit" option allows history_limit_days to be omitted. However, when omitted, the default value appears to be 90. Therefore, even when attempting to set "No Limit," terraform import incorrectly assigns 0, causing an error during the plan phase.
Steps to Reproduce
- Set the "Incident history limit" to "No Limit" in the StatusPal management dashboard.
- Import the corresponding status page resource using
terraform import. - Check the Terraform configuration after the import, which will show
history_limit_days = 0. - Run
terraform planand observe the following error:Attribute status_page.history_limit_days value must be one of: ["30" "90" "365"], got: 0
Environment Information
- Terraform Version: 1.9.5
- Terraform Provider (StatusPal) Version: 0.3.0
- StatusPal Setting: Incident history limit = "No Limit"
- OS / Execution Environment: macOS 14.7.2
Expected Fix
- The Terraform Provider should correctly handle "No Limit" by ensuring
history_limit_daysis either omitted or treated as "No Limit" when imported. - The behavior should align with the official documentation, where the "No Limit" setting allows
history_limit_daysto be omitted. The default value (90) should not be applied, and no errors should occur during plan or apply.
Notes & Suggestions
- Ideally, the Terraform Provider should support the omission of
history_limit_daysas described in the documentation. - If a special value (e.g.,
nullor-1) is needed to represent "No Limit," this handling should be clearly documented for user clarity.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels