Skip to content

fix(DBParameterGroup): false drift on provided default value #618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 1, 2025

Conversation

cheajer
Copy link
Member

@cheajer cheajer commented Jun 26, 2025

This change fixes a bug where false drift would be reported when user specifies parameter value that is equal to engine default value.

// Parameter 'source' can either be 'engine-default', 'user' or 'system'
// Here, we should only consider parameters modified by the user
return currentDBParameters.entrySet().stream()
.filter(entry -> "user".equals(entry.getValue().source()))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a good simplification of the code, but it does not fix the bug reported in aws-cloudformation/cloudformation-coverage-roadmap#1699.

Specifically, it does not handle the case when the parameter group is created with the template specifying the same value as the default. This is because Source will still be set to system or engine-default. (I'm not sure it's possible to fix this without a change to the RDS API.)

@zrfr zrfr added this pull request to the merge queue Jul 1, 2025
Merged via the queue into aws-cloudformation:master with commit 291796b Jul 1, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants