Skip to content

Commit

Permalink
fix(rds): secret for ServerlessCluster is not accessible programmatic…
Browse files Browse the repository at this point in the history
…ally (#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*
  • Loading branch information
njlynch authored Oct 3, 2020
1 parent 86e6c12 commit 028495e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/@aws-cdk/aws-rds/lib/serverless-cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,15 +319,16 @@ export class ServerlessCluster extends ServerlessClusterBase {
/**
* The secret attached to this cluster
*/
private readonly secret?: secretsmanager.ISecret;
public readonly secret?: secretsmanager.ISecret;

private readonly subnetGroup: ISubnetGroup;
private readonly vpc: ec2.IVpc;
private readonly vpcSubnets?: ec2.SubnetSelection;

private readonly singleUserRotationApplication: secretsmanager.SecretRotationApplication;
private readonly multiUserRotationApplication: secretsmanager.SecretRotationApplication;

constructor(scope:Construct, id: string, props: ServerlessClusterProps) {
constructor(scope: Construct, id: string, props: ServerlessClusterProps) {
super(scope, id);

this.vpc = props.vpc;
Expand Down

0 comments on commit 028495e

Please sign in to comment.