aws-cloudformation / aws-cloudformation-resource-providers-rds

The CloudFormation Resource Provider Package For Amazon Relational Database Service
https://aws.amazon.com/rds/
Apache License 2.0
26 stars 42 forks source link

[DBInstance] Send EnablePerformanceInsights when changing Performance… #531

Closed dbbh closed 3 months ago

dbbh commented 3 months ago

…InsightsRetentionPeriod

Issue #, if available:

Description of changes: This PR introduces two changes for PerformanceInsights request parameters handling. First it will always send enablePerformanceInsights flag when changing performanceInsightsRetentionPeriod. This is to ensure that when the retention period changes, if the feature is disabled in the instance for any reason but enabled in the model, it will update the instance to reflect the model. Second, it adds performanceInsightsRetentionPeriod field to the modify-after-create call to ensure APIs that do not take this parameter will not cause drift as the parameter is set via ModifyDBInstance during the stack creation.

Both of these changes are covered by unit tests added in the same code change.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.