Skip to content

Issue with partition var reduce_retention_period_immediately #702

@eambrosyupgrade

Description

@eambrosyupgrade

Problem

The variable reduce_retention_period_immediately is optional however it doesn't seem to track the changes in state.

If I reduce the retention period of a partition in terraform from say 100 > 90; and have this option set to false, it applies "successfully" but since the change is staged and the retention period is still 100d for the next week, I get continual drift in my terraform pipeline since the terraform state expects that the retention period should be 90d now, and is unaware that retention will change eventually.

So in a pipeline I have to set this to true, otherwise I get constant drift and applies that attempt to set the partition to a new retention period, in 7 days from the last apply.

Expected Behavior

The provider should record that this change is "staged"; timestamps of the swap and compare that with the timestamps for the retention reduction. Looking at the API here I think the issue is that that response value of retentionEffectiveAt isn't in state and doesn't seem to exist in the partition's resource.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions