- 
                Notifications
    You must be signed in to change notification settings 
- Fork 4.3k
feat(rds): add DatabaseProxyEndpoint L2 construct #35064
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
Conversation
| AWS CodeBuild CI Report
 Powered by github-codebuild-logs, available on the AWS Serverless Application Repository | 
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.
Hi @phuhung273
Thanks for your contribution.
I have left some comments :)
| * | ||
| * @default - CloudFormation-generated name | ||
| */ | ||
| readonly dbProxyEndpointName?: string; | 
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.
For the AWS::RDS::DBProxyEndpoint resource in AWS CloudFormation, the dbProxyEndpointName property is required and  is not automatically generated. Suggestion: we can make the field required and update the documentation accordingly.
And even if we want to generate the name, the docs should tell that it's "cdk generated" and not "cloudformation generated"
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.
It is true that dbProxyEndpointName is required for CloudFormation, CLI,... But I saw the pattern from proxy.ts to take input or generate one and think this way has better user experience.
aws-cdk/packages/aws-cdk-lib/aws-rds/lib/proxy.ts
Lines 461 to 464 in c126e35
| const physicalName = props.dbProxyName || ( | |
| cdk.FeatureFlags.of(this).isEnabled(cxapi.DATABASE_PROXY_UNIQUE_RESOURCE_NAME) ? | |
| cdk.Names.uniqueResourceName(this, { maxLength: 60 }) : id | |
| ); | 
So I've updated the docstring to CDK generated. Let me know what you think.
Pull request has been modified.
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.
Thanks for making the changes promptly :)
| 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). | 
| Comments on closed issues and PRs are hard for our team to see. | 
Issue # (if applicable)
Closes #14186
Reason for this change
Add DatabaseProxyEndpoint L2 construct
Description of changes
DatabaseProxyEndpointL2 constructDatabaseProxysupport methodaddEndpointDescribe any new or updated permissions being added
Description of how you validated changes
Unit + Integ
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license