Skip to content

Commit 028495e

Browse files
authored
fix(rds): secret for ServerlessCluster is not accessible programmatically (aws#10657)
In a last-minute change, the secret was changed from public (matching all of the other RDS constructs) to private. This means users who don't specify a secret, and rely on the auto-generated one, have no programmatic means of accessing the secret. Brought up by a user on the CDK.dev Slack channel. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 86e6c12 commit 028495e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/@aws-cdk/aws-rds/lib/serverless-cluster.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,15 +319,16 @@ export class ServerlessCluster extends ServerlessClusterBase {
319319
/**
320320
* The secret attached to this cluster
321321
*/
322-
private readonly secret?: secretsmanager.ISecret;
322+
public readonly secret?: secretsmanager.ISecret;
323+
323324
private readonly subnetGroup: ISubnetGroup;
324325
private readonly vpc: ec2.IVpc;
325326
private readonly vpcSubnets?: ec2.SubnetSelection;
326327

327328
private readonly singleUserRotationApplication: secretsmanager.SecretRotationApplication;
328329
private readonly multiUserRotationApplication: secretsmanager.SecretRotationApplication;
329330

330-
constructor(scope:Construct, id: string, props: ServerlessClusterProps) {
331+
constructor(scope: Construct, id: string, props: ServerlessClusterProps) {
331332
super(scope, id);
332333

333334
this.vpc = props.vpc;

0 commit comments

Comments
 (0)