-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
feat(rds): enable grantDataApiAccess
method for imported database cluster
#31280
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
Thanks, changed! |
...-cdk-testing/framework-integ/test/aws-rds/test/integ.cluster-data-api-to-imported-cluster.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
grantDataApiAccess
method for an imported database cluster.Because the imported database cluster always has the
enableDataApi
with false.https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-rds/lib/cluster.ts#L983
But the
grantDataApiAccess
throws an error when theenableDataApi
is 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
dataApiEnabled
to attributes for the imported database cluster.If the
dataApiEnabled
to the attributes is set to true, theenableDataApi
in the imported cluster will be set to true and thegrantDataApiAccess
can 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