Skip to content

Observability throws an error setting metrics when metrics plan #1149

@JorTurFer

Description

@JorTurFer

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions