fix(rds): keep Aurora member passwords owned by their cluster (#5685)

* fix(rds): keep Aurora passwords owned by the cluster

* test(rds): cover member changes across regions
This commit is contained in:
David Phillips authored and GitHub committed 2026-10-14 20:43:53 -04:00
1 parent 8145ffd00e
commit 430af5fce7
5 files changed
+146 -1

No files matched your search

@@ -3006,7 +3006,10 @@ public class RdsService implements Resettable, ResourceProvider {
instance.setOptionGroupName(optionGroupName);
}
boolean passwordRotated = false;
if (newPassword != null && !newPassword.isBlank()) {
boolean clusterMember = instance.getDbClusterIdentifier() != null
&& !instance.getDbClusterIdentifier().isBlank();
// Aurora member master credentials are owned and changed by the cluster.
if (!clusterMember && newPassword != null && !newPassword.isBlank()) {
String oldPassword = instance.getMasterPassword();
boolean backendRunning = !config.services().rds().mock()
&& instance.getDbClusterIdentifier() == null && instance.getContainerId() != null;