From a1138161ca295ad4a81fe32b51beb82438653144 Mon Sep 17 00:00:00 2001 From: Joshua Weber <57131123+daschaa@users.noreply.github.com> Date: Mon, 11 Jul 2022 11:44:08 +0200 Subject: [PATCH] feat(neptune): add engine version 1.1.1.0 (#21079) Fixes #20869. Adds new engine version `1.1.1.0` to Neptune. See https://docs.aws.amazon.com/neptune/latest/userguide/engine-releases.html As this is just a new enum value, it would be great if the label `pr-linter/exempt-readme` and `pr-linter/exempt-integ-test` could be added. Thanks! ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-neptune/lib/cluster.ts | 4 ++++ .../@aws-cdk/aws-neptune/test/cluster.test.ts | 23 +++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/packages/@aws-cdk/aws-neptune/lib/cluster.ts b/packages/@aws-cdk/aws-neptune/lib/cluster.ts index a9303286b3693..eb40b6ec3589b 100644 --- a/packages/@aws-cdk/aws-neptune/lib/cluster.ts +++ b/packages/@aws-cdk/aws-neptune/lib/cluster.ts @@ -54,6 +54,10 @@ export class EngineVersion { * Neptune engine version 1.1.0.0 */ public static readonly V1_1_0_0 = new EngineVersion('1.1.0.0'); + /** + * Neptune engine version 1.1.1.0 + */ + public static readonly V1_1_1_0 = new EngineVersion('1.1.1.0'); /** * Constructor for specifying a custom engine version diff --git a/packages/@aws-cdk/aws-neptune/test/cluster.test.ts b/packages/@aws-cdk/aws-neptune/test/cluster.test.ts index 915fe9cf34d0a..4bf730e8aa8d0 100644 --- a/packages/@aws-cdk/aws-neptune/test/cluster.test.ts +++ b/packages/@aws-cdk/aws-neptune/test/cluster.test.ts @@ -118,6 +118,29 @@ describe('DatabaseCluster', () => { }); }); + test.each([ + ['1.1.1.0', EngineVersion.V1_1_1_0], + ])('can create a cluster for engine version %s', (expected, version) => { + // GIVEN + const stack = testStack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + + // WHEN + new DatabaseCluster(stack, 'Database', { + vpc, + instanceType: InstanceType.R5_LARGE, + engineVersion: version, + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::Neptune::DBCluster', { + EngineVersion: expected, + DBSubnetGroupName: { Ref: 'DatabaseSubnets3C9252C9' }, + VpcSecurityGroupIds: [{ 'Fn::GetAtt': ['DatabaseSecurityGroup5C91FDCB', 'GroupId'] }], + }); + }); + + test('can create a cluster with imported vpc and security group', () => { // GIVEN const stack = testStack();