From 215631fcaf25cf5b77ea94e9234e381c8c7d0643 Mon Sep 17 00:00:00 2001 From: Jonathan Colbert Date: Sun, 6 Oct 2024 15:19:29 -0400 Subject: [PATCH] set cluster secret when using manageMasterUserPassword --- packages/aws-cdk-lib/aws-rds/lib/cluster.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/aws-cdk-lib/aws-rds/lib/cluster.ts b/packages/aws-cdk-lib/aws-rds/lib/cluster.ts index 5337608899f03..18c888802e4fd 100644 --- a/packages/aws-cdk-lib/aws-rds/lib/cluster.ts +++ b/packages/aws-cdk-lib/aws-rds/lib/cluster.ts @@ -1236,6 +1236,7 @@ export class DatabaseCluster extends DatabaseClusterNew { this.clusterIdentifier = cluster.ref; this.clusterResourceIdentifier = cluster.attrDbClusterResourceId; + this.secret = secretsmanager.Secret.fromSecretCompleteArn(this, 'DbClusterSecret', cluster.attrMasterUserSecretSecretArn); } // create a number token that represents the port of the cluster