-
Notifications
You must be signed in to change notification settings - Fork 4.5k
(rds): unable to alter master user password when using DatabaseClusterFromSnapshot with snapshotCredentials #21730
Copy link
Copy link
Closed
Labels
@aws-cdk/aws-rdsRelated to Amazon Relational DatabaseRelated to Amazon Relational DatabasebugThis issue is a bug.This issue is a bug.closed-for-stalenessThis issue was automatically closed because it hadn't received any attention in a while.This issue was automatically closed because it hadn't received any attention in a while.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortneeds-cfnThis issue is waiting on changes to CloudFormation before it can be addressed.This issue is waiting on changes to CloudFormation before it can be addressed.p1response-requestedWaiting on additional info and feedback. Will move to "closing-soon" in 7 days.Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-rdsRelated to Amazon Relational DatabaseRelated to Amazon Relational DatabasebugThis issue is a bug.This issue is a bug.closed-for-stalenessThis issue was automatically closed because it hadn't received any attention in a while.This issue was automatically closed because it hadn't received any attention in a while.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortneeds-cfnThis issue is waiting on changes to CloudFormation before it can be addressed.This issue is waiting on changes to CloudFormation before it can be addressed.p1response-requestedWaiting on additional info and feedback. Will move to "closing-soon" in 7 days.Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Describe the bug
About 2 months ago a this PR got merged, which states that we should be able to alter the master user password of the snapshot using the
snapshotCredentialsprop. However when using this prop CDK creates a new secret in Secrets Manager, but the master user password still remains unchanged. It seems like the DatabaseSecret that is created is not being used.Looking at the code of the PR, the
masterUserPasswordgets changed in thecfnDbClusterwhile also having thesnapshotIdentifierprop. However the docs state to NOT use themasterUserPasswordprop together with thesnapshotIdentifierprop.Expected Behavior
When using the
snapshotCredentialsproperty withrds.SnapshotCredentials.fromGeneratedSecret()inside theDatabaseClusterFromSnapshotconstruct. I expect the master user password to be changed to the password that is generated in Secrets Manager.Current Behavior
A DatabaseSecret is created inside Secrets Manger, however the master user password of the snapshot remains unchanged.
Reproduction Steps
DatabaseClusterconstruct in CDKDatabaseClusterFromSnapshotconstruct to CDK using thesnapshotCredentialswithSnapshotCredentials.fromGeneratedSecret(), and remove theDatabaseClusterconstruct from CDKDatabaseClusterFromSnapshotPossible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.27.0
Framework Version
No response
Node.js Version
16
OS
Linux
Language
Typescript
Language Version
No response
Other information
No response