Skip to content

feat(rds): add fromLookup method for Amazon Aurora Database Cluster #34849

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 4, 2025

Conversation

mazyu36
Copy link
Contributor

@mazyu36 mazyu36 commented Jun 28, 2025

Issue # (if applicable)

Closes #34848 .

Reason for this change

Implement a lookup function for RDS DatabaseCluster similar to the existing DatabaseInstance.fromLookup functionality.
#33258

This allows users to fetch an Aurora RDS cluster reference by identifier rather than having to manually provide all connection details.

Description of changes

Add fromLookup method to DatabaseCluster.

Describe any new or updated permissions being added

N/A

Description of how you validated changes

Add unit tests and an integ test.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team June 28, 2025 10:01
@github-actions github-actions bot added feature-request A feature should be added or improved. p2 distinguished-contributor [Pilot] contributed 50+ PRs to the CDK labels Jun 28, 2025
@mazyu36 mazyu36 changed the title feat(rds): add aurora-from-lookup feat(rds): add fromLookup method for Amazon Aurora Database Cluster Jun 28, 2025
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jun 28, 2025
Copy link
Contributor

@badmintoncryer badmintoncryer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution! I've added some small comments.

* Lookup an existing DatabaseCluster using clusterIdentifier.
*/
public static fromLookup(scope: Construct, id: string, options: DatabaseClusterLookupOptions): IDatabaseCluster {
const response: {[key: string]: any}[] = ContextProvider.getValue(scope, {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Added a validation and a unit test.

@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jun 28, 2025
@mazyu36
Copy link
Contributor Author

mazyu36 commented Jun 29, 2025

@badmintoncryer
Thank you for the review!
I’ve addressed the comments.

@mazyu36 mazyu36 requested a review from badmintoncryer June 29, 2025 05:09
Copy link
Contributor

@badmintoncryer badmintoncryer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks!

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jun 29, 2025
@leonmk-aws leonmk-aws self-assigned this Jun 30, 2025
Copy link
Contributor

@leonmk-aws leonmk-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution, approved

Copy link
Contributor

mergify bot commented Jul 4, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

Copy link
Contributor

mergify bot commented Jul 4, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 23ca6fc into aws:main Jul 4, 2025
18 checks passed
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: d1445c1
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Copy link
Contributor

github-actions bot commented Jul 4, 2025

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
distinguished-contributor [Pilot] contributed 50+ PRs to the CDK feature-request A feature should be added or improved. p2 pr/needs-maintainer-review This PR needs a review from a Core Team Member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(aws-rds): support lookup method for Aurora DatabaseCluster
4 participants