feat(rds): enable grantDataApiAccess method for imported database cluster#31280
feat(rds): enable grantDataApiAccess method for imported database cluster#31280mergify[bot] merged 7 commits intoaws:mainfrom
grantDataApiAccess method for imported database cluster#31280Conversation
badmintoncryer
left a comment
There was a problem hiding this comment.
Thank you for the PR! I've added only a nit comment.
I hardcoded enableDataApi as false for the imported cluster, so I really appreciate the fix!
...-cdk-testing/framework-integ/test/aws-rds/test/integ.cluster-data-api-to-imported-cluster.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Kazuho Cryer-Shinozuka <malaysia.cryer@gmail.com>
|
Thanks, changed! |
...-cdk-testing/framework-integ/test/aws-rds/test/integ.cluster-data-api-to-imported-cluster.ts
Show resolved
Hide resolved
GavinZZ
left a comment
There was a problem hiding this comment.
LGTM, thanks for the quick response to my question.
|
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 |
|
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). |
|
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
Closes #31116 .
Reason for this change
It was not possible to call the
grantDataApiAccessmethod for an imported database cluster.Because the imported database cluster always has the
enableDataApiwith false.https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-rds/lib/cluster.ts#L983
But the
grantDataApiAccessthrows an error when theenableDataApiis set to false.https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-rds/lib/cluster.ts#L523-L526
Description of changes
Added the property
dataApiEnabledto attributes for the imported database cluster.If the
dataApiEnabledto the attributes is set to true, theenableDataApiin the imported cluster will be set to true and thegrantDataApiAccesscan be called.Description of how you validated changes
Unit and integ tests.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license