diff --git a/.changelog/42541.txt b/.changelog/42541.txt new file mode 100644 index 000000000000..7f878c8393e7 --- /dev/null +++ b/.changelog/42541.txt @@ -0,0 +1,3 @@ +```release-note:bug +resource/aws_rds_cluster: Fixes the behavior when enabling database_insights_mode="advanced" without changing performance insights retention window +``` \ No newline at end of file diff --git a/internal/service/rds/cluster.go b/internal/service/rds/cluster.go index d69681362bd6..4914e066dcb7 100644 --- a/internal/service/rds/cluster.go +++ b/internal/service/rds/cluster.go @@ -1615,6 +1615,7 @@ func resourceClusterUpdate(ctx context.Context, d *schema.ResourceData, meta any if d.HasChange("database_insights_mode") { input.DatabaseInsightsMode = types.DatabaseInsightsMode(d.Get("database_insights_mode").(string)) input.EnablePerformanceInsights = aws.Bool(d.Get("performance_insights_enabled").(bool)) + input.PerformanceInsightsRetentionPeriod = aws.Int32(int32(d.Get("performance_insights_retention_period").(int))) } if d.HasChange("db_cluster_instance_class") {