Skip to content

DatabaseSecret construct in @aws-cdk/rds should support a custom database name #24728

@hsohail94

Description

@hsohail94

Describe the feature

RDS.DatabaseSecret construct should support setting a custom dbname in the secret that gets created in Secrets Manager.

Use Case

When pulling the database-related secret from Secrets Manager, we use all of its values (username, password, database name, etc.) when creating a connection to an RDS database. However, the database name is whatever the default DB was at the time of the RDS cluster's creation, so in many cases, this means that the code pulling the secret can end up connecting to the wrong database.

Proposed Solution

Add a variable to RDS.DatabaseSecret - PR coming soon.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.67

Environment details (OS name and version, etc.)

MacOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions