Skip to content

Commit

Permalink
feat(neptune): add engine version 1.1.1.0 (#21079)
Browse files Browse the repository at this point in the history
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*
  • Loading branch information
daschaa committed Jul 11, 2022
1 parent c335ba3 commit a113816
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/@aws-cdk/aws-neptune/lib/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 23 additions & 0 deletions packages/@aws-cdk/aws-neptune/test/cluster.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit a113816

Please sign in to comment.