-
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
rds: use DataAPI for Aurora cluster without invoking secret.grantRead()
#29362
rds: use DataAPI for Aurora cluster without invoking secret.grantRead()
#29362
Comments
secret.grantRead()
secret.grantRead()
Thanks for the feature request - the response to the comment you linked seems to suggest that this is a valid request, if you are interested in submitting another PR for consideration. |
…okes when using DataAPI with Aurora cluster (#29399) ### Issue # (if applicable) Closes #29362. ### Reason for this change As discussed [there](#29338 (comment)), we should invoke `secret.grantRead()` explicitly when using DataAPI with Aurora cluster. Because it's inconvenient for users, I made `secret.grantRead()` be invoked within `cluster.grantDataApiAccess()`. ### Description of changes - move `cluster.secret` from `DatabaseClusterNew` to `DatabaseClusterBase` to use it within `DatabaseClusterBase.grantDataApiAccess()` - add `secret.grantRead()` in `cluster.grantDataApiAccess()` - add `secret` property to `DatabaseClusterAttributes` #### Points of concern `DatabaseClusterBase` class is extended by `ImportedDatabaseCluster` class. Therefore, it is necessary to define `ImportedDatabaseCluster.secret`. I simply added `secret` props to `DatabaseClusterAttributes` but I cannot believe this is the best way. Other ways are.. - add `secretArn` to `DatabaseClusterAttributes` - don't add secret info and `ImportedDatabaseCluster.secret` becomes always undefined ### Description of how you validated changes ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Describe the feature
To use DataAPI for an Aurora cluster without invoking
secret.grantRead()
.Use Case
DataAPI for an Aurora cluster is supported (#29338).
It is necessary to invoke
secret.grantRead()
forDatabaseCluster
but it is unnecessary forServelessCluster
.This inconsistency is user-unfriendly and should be addressed.
Proposed Solution
Move
cluster.secret
fromDatabaseClusterNew
toDatabaseClusterBase
and invokesecret.grantRead()
incluster.grantDataApiAccess()
#29338 (comment)
Other Information
No response
Acknowledgements
CDK version used
2.131.0
Environment details (OS name and version, etc.)
irrelevant
The text was updated successfully, but these errors were encountered: