feat(rds): add fromLookup method for Amazon Aurora Database Cluster #34849
feat(rds): add fromLookup method for Amazon Aurora Database Cluster #34849mergify[bot] merged 7 commits intoaws:mainfrom
fromLookup method for Amazon Aurora Database Cluster #34849Conversation
fromLookup method for Amazon Aurora Database Cluster
| * Lookup an existing DatabaseCluster using clusterIdentifier. | ||
| */ | ||
| public static fromLookup(scope: Construct, id: string, options: DatabaseClusterLookupOptions): IDatabaseCluster { | ||
| const response: {[key: string]: any}[] = ContextProvider.getValue(scope, { |
There was a problem hiding this comment.
How about adding a validation to ensure that clusterIdentifier is not a token.
ref1: https://github.com/aws/aws-cdk/pull/33619/files#diff-b209f8fb85158efdb494a934528ef03b97b97e4b8785997c3fb6e25f08ccb472R132
ref2: https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-ecr/lib/repository.ts#L645
There was a problem hiding this comment.
Thanks. Added a validation and a unit test.
Co-authored-by: Kazuho Cryer-Shinozuka <malaysia.cryer@gmail.com>
|
@badmintoncryer |
leonmk-aws
left a comment
There was a problem hiding this comment.
Thank you for your contribution, approved
|
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). |
|
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). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Comments on closed issues and PRs are hard for our team to see. |
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
fromLookupmethod toDatabaseCluster.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