Skip to content
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(neptune): high level constructs for db clusters and instances #12763

Merged
merged 7 commits into from Mar 1, 2021

Conversation

@cornerwings
Copy link
Contributor

@cornerwings cornerwings commented Jan 29, 2021

  • This change adds higher level constructs for Neptune clusters
  • Adds higher-level constructs for
    • AWS::Neptune::DBCluster
    • AWS::Neptune::DBInstance
    • AWS::Neptune::DBClusterParameterGroup
    • AWS::Neptune::DBParameterGroup
    • AWS::Neptune::DBSubnetGroup

fixes #12762


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

- This change adds higher level constructs for Neptune clusters
- Adds higher-level constructs for
  - AWS::Neptune::DBCluster
  - AWS::Neptune::DBInstance
  - AWS::Neptune::DBClusterParameterGroup
  - AWS::Neptune::DBParameterGroup
  - AWS::Neptune::DBSubnetGroup

fixes #12762
@gitpod-io
Copy link

@gitpod-io gitpod-io bot commented Jan 29, 2021

Copy link
Contributor

@njlynch njlynch left a comment

Wow, thanks for this contribution!

It's going to take me a few days to have the time to dive deep into this, but I've given it a quick skim and it looks like it's in really great shape. I imagine this is heavily inspired/borrowed from the RDS module.

One point of note is that the description claims this provides the high-level constructs for clusters and instances, but I'm only seeing "L2s" for the cluster. That's totally fine; this is big enough as-is, and we should be able to add in the instances later. I just wanted to clarify intent.

Another minor high-level note is that the pattern of cluster-ref and cluster is kind of a "legacy" holdover and I'd rather us just combine into one file. Same with props, although I can imagine the instance-specific stuff there going into the (eventual) instance L2.

Lastly, we'll want to add more detail to the README to cover some of the other usage/elements. It doesn't need to be 100% comprehensive, but a bit more than is currently there I think is necessary to get folks up and running quickly.

I'll circle back around (hopefully) next week to do the first pass on the code itself.

Thanks again!

@cornerwings
Copy link
Contributor Author

@cornerwings cornerwings commented Jan 29, 2021

Thanks Nick for taking a quick pass at this (yes, code is inspired (read: copied 🙂) from rds/docdb modules)!

Good point regarding the instances - I was initially thinking of adding a L2 construct for that but didn't end up doing it because most customers just pick the no. of instances and let the service figure out the distribution. But it might be worth adding if someone wants to give specific names to instances or launch them in specific availability zones. I will take a stab at this, will get rid of current InstanceProps and merge them back to ClusterProps to avoid confusion with the actual instance props (which will take some additional attributes such as reference to the cluster). Thanks for the note on cluster-ref pattern, will clean that up too along with adding more examples in README.

Copy link
Contributor

@njlynch njlynch left a comment

Looks good! I've done a first pass of comments throughout.

packages/@aws-cdk/aws-neptune/README.md Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-neptune/README.md Show resolved Hide resolved
packages/@aws-cdk/aws-neptune/lib/cluster.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-neptune/lib/cluster.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-neptune/lib/instance.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-neptune/test/endpoint.test.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-neptune/test/endpoint.test.ts Outdated Show resolved Hide resolved
@mergify mergify bot dismissed njlynch’s stale review Feb 24, 2021

Pull request has been modified.

packages/@aws-cdk/aws-neptune/README.md Show resolved Hide resolved
packages/@aws-cdk/aws-neptune/lib/cluster.ts Outdated Show resolved Hide resolved
*
* @default - false, connections to database don't require IAM auth
*/
readonly iamAuthEnabled?: boolean;

This comment has been minimized.

@njlynch

njlynch Feb 24, 2021
Contributor

Why was this removed?

This comment has been minimized.

@cornerwings

cornerwings Feb 25, 2021
Author Contributor

I wanted to test this before adding support for it, found some conflicting information where AWS CLI says IAM authentication is not supported by Neptune at the cluster level but is supported at instance level (whereas CFN has no flag to pass this value at instance level). Wanted to check if SDK documentation is incorrect or if it is a really an instance specific setting and if so whether CFN support for IAM needs to be fixed.

@njlynch
njlynch approved these changes Mar 1, 2021
Copy link
Contributor

@njlynch njlynch left a comment

Looks good. Looking forward to getting these out there and getting some feedback!

Thanks for the contribution!

@mergify
Copy link
Contributor

@mergify mergify bot commented Mar 1, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
Copy link
Contributor

@mergify mergify bot commented Mar 1, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation commented Mar 1, 2021

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: e9573ea
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

This was referenced Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants