From 73e742155863b5ab76217c7b70e4c9833daf9c83 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 d277dc3b05b2c..8a4eb01473362 100644 --- a/packages/aws-cdk-lib/aws-rds/lib/cluster.ts +++ b/packages/aws-cdk-lib/aws-rds/lib/cluster.ts @@ -1322,6 +1322,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