feat(rds): simpler way to configure parameters for instance and cluster#18126
feat(rds): simpler way to configure parameters for instance and cluster#18126mergify[bot] merged 26 commits intoaws:masterfrom hoegertn:hoegertn-18124
Conversation
| import * as cdk from '@aws-cdk/core'; | ||
| import * as cxapi from '@aws-cdk/cx-api'; | ||
| import * as rds from '../lib'; | ||
| import { SqlServerEngineVersion } from '../lib'; |
There was a problem hiding this comment.
Nope! Use the qualified import (rds) from above please 🙂.
|
I also added the cluster now. Currently, there are no README changes as the parameter group is also not documented. How should I proceed here? |
Let's add a section in the ReadMe, showing off the two ways of setting a |
|
@skinny85 Is there anything missing from my side? |
Probably nothing beyond the fact that you didn't re-request my approval, so I missed this 😃. |
packages/@aws-cdk/aws-rds/README.md
Outdated
|
|
||
| new rds.DatabaseInstance(this, 'Database', { | ||
| engine: rds.DatabaseInstanceEngine.SQL_SERVER_EE, | ||
| instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), |
There was a problem hiding this comment.
This is optional, right? I think there's no need to include it in the example.
packages/@aws-cdk/aws-rds/README.md
Outdated
|
|
||
| new rds.DatabaseInstance(this, 'Database', { | ||
| engine: rds.DatabaseInstanceEngine.sqlServerEe({ version: rds.SqlServerEngineVersion.VER_12_00_5000_0_V1 }), | ||
| instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), |
There was a problem hiding this comment.
| instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), |
| key: 'value', | ||
| }, | ||
| instanceProps: { | ||
| instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), |
There was a problem hiding this comment.
I think we can get rid of this.
Co-authored-by: Adam Ruka <adamruka85@gmail.com>
Co-authored-by: Adam Ruka <adamruka85@gmail.com>
Co-authored-by: Jonathan Goldwasser <jogold@users.noreply.github.com>
Co-authored-by: Jonathan Goldwasser <jogold@users.noreply.github.com>
Co-authored-by: Jonathan Goldwasser <jogold@users.noreply.github.com>
Co-authored-by: Adam Ruka <adamruka85@gmail.com>
Co-authored-by: Adam Ruka <adamruka85@gmail.com>
Co-authored-by: Adam Ruka <adamruka85@gmail.com>
Co-authored-by: Adam Ruka <adamruka85@gmail.com>
Co-authored-by: Adam Ruka <adamruka85@gmail.com>
|
@hoegertn what's the status of this? |
|
Sorry, had some busy weeks. I need to write the missing tests and then this is ready. I plan to finish this within the next days. |
|
Sounds great! No rush, I just wanted to make sure you weren't waiting on my review 🙂. Re-request my review (there's a button in the top-right of the PR window, next to my avatar) once you're ready for another round of reviews! |
packages/@aws-cdk/aws-rds/README.md
Outdated
| declare const vpc: ec2.Vpc; | ||
|
|
||
| new rds.DatabaseInstance(this, 'Database', { | ||
| engine: rds.DatabaseInstanceEngine.sqlServerEe({ version: rds.SqlServerEngineVersion.VER_12_00_5000_0_V1 }), |
There was a problem hiding this comment.
Ok. Can we make the above example use a versioned engine too then?
packages/@aws-cdk/aws-rds/README.md
Outdated
| declare const vpc: ec2.Vpc; | ||
|
|
||
| new rds.DatabaseInstance(this, 'Database', { | ||
| engine: rds.DatabaseInstanceEngine.sqlServerEe({ version: rds.SqlServerEngineVersion.VER_12_00_5000_0_V1 }), |
There was a problem hiding this comment.
Can we use rds.SqlServerEngineVersion.VER_11 here too, like we do above?
| ...props.parameters && { | ||
| dbParameterGroupName: new ParameterGroup(this, 'ParameterGroup', { | ||
| engine: props.engine, | ||
| parameters: props.parameters, | ||
| }).bindToInstance({}).parameterGroupName, | ||
| }, |
There was a problem hiding this comment.
Can we extract this all of this to a parameterGroupName: string | undefined local variable? This code is way, way too clever for my liking.
| credentials: { | ||
| username: 'admin', | ||
| }, |
There was a problem hiding this comment.
This is optional, I would remove it from this test.
| // WHEN | ||
| new rds.DatabaseInstance(stack, 'Database', { | ||
| engine: rds.DatabaseInstanceEngine.sqlServerEe({ version: rds.SqlServerEngineVersion.VER_12_00_5000_0_V1 }), | ||
| instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), |
There was a problem hiding this comment.
This is optional, I would remove it from this test.
| engine: rds.DatabaseInstanceEngine.sqlServerEe({ | ||
| version: rds.SqlServerEngineVersion.VER_11, | ||
| }), | ||
| description: 'desc', |
There was a problem hiding this comment.
This is optional, I would remove it from this test.
| expect(() => { | ||
| new rds.DatabaseInstance(stack, 'Database', { | ||
| engine: rds.DatabaseInstanceEngine.sqlServerEe({ version: rds.SqlServerEngineVersion.VER_12_00_5000_0_V1 }), | ||
| instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), |
There was a problem hiding this comment.
This is optional, I would remove it from this test.
Co-authored-by: Adam Ruka <adamruka85@gmail.com>
Pull request has been modified.
Co-authored-by: Adam Ruka <adamruka85@gmail.com>
Co-authored-by: Adam Ruka <adamruka85@gmail.com>
Co-authored-by: Adam Ruka <adamruka85@gmail.com>
Co-authored-by: Adam Ruka <adamruka85@gmail.com>
Co-authored-by: Adam Ruka <adamruka85@gmail.com>
|
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 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 master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Since aws/aws-cdk#18126, this exact logic is handled by aws-cdk.
Since aws/aws-cdk#18126, this exact logic is handled by aws-cdk.
Fixes #18124
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license