-
Notifications
You must be signed in to change notification settings - Fork 48
Description
Description
Based on service plan docs, the retention of the metrics should be configurable for Monitoring XXXX plans but the current terraform resource raises and error.
Steps to reproduce
Try to plan an observability resource with service plan "Observability-Monitoring-Basic-EU01" just setting any retention time for metrics and execute terraform plan.
Actual behavior
An error is shown saying that the option isn't supported for the plan
Expected behavior
No errors
## Additional info
The problem is that this validation isn't correct
terraform-provider-stackit/stackit/internal/services/observability/instance/resource.go
Lines 927 to 929 in da2bb41
| if metricsRetentionDays != nil || metricsRetentionDays5mDownsampling != nil || metricsRetentionDays1hDownsampling != nil { | |
| core.LogAndAddError(ctx, &resp.Diagnostics, "Error validating plan", fmt.Sprintf("Plan (%s) does not support configuring metrics retention days. Remove this from your config or use a different plan.", *plan.Name)) | |
| } |
It verifies if the storage for logs and traces is 0 and then, it assumes that configuring metrics isn't possible either, when in theory is possible