Skip to content

Commit

Permalink
autoMinorVersionUpgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
badmintoncryer committed Nov 2, 2024
1 parent 5137e38 commit 41f2f41
Show file tree
Hide file tree
Showing 13 changed files with 2,350 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/@aws-cdk/aws-neptune-alpha/lib/instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,13 @@ export interface DatabaseInstanceProps {
* @default RemovalPolicy.Retain
*/
readonly removalPolicy?: cdk.RemovalPolicy;

/**
* Indicates that minor version patches are applied automatically.
*
* @default true
*/
readonly autoMinorVersionUpgrade?: boolean;
}

/**
Expand Down Expand Up @@ -494,6 +501,7 @@ export class DatabaseInstance extends DatabaseInstanceBase implements IDatabaseI
super(scope, id);

const instance = new CfnDBInstance(this, 'Resource', {
autoMinorVersionUpgrade: props.autoMinorVersionUpgrade,
dbClusterIdentifier: props.cluster.clusterIdentifier,
dbInstanceClass: props.instanceType._instanceType,
availabilityZone: props.availabilityZone,
Expand Down
17 changes: 17 additions & 0 deletions packages/@aws-cdk/aws-neptune-alpha/test/instance.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,23 @@ describe('DatabaseInstance', () => {
});
});

test.each([true, false])('instance with auto minor version upgrade', (autoMinorVersionUpgrade) => {
// GIVEN
const stack = testStack();

// WHEN
new DatabaseInstance(stack, 'Instance', {
cluster: stack.cluster,
instanceType: InstanceType.R5_LARGE,
autoMinorVersionUpgrade,
});

// THEN
Template.fromStack(stack).hasResourceProperties('AWS::Neptune::DBInstance', {
AutoMinorVersionUpgrade: autoMinorVersionUpgrade,
});
});

test('instance type from CfnParameter', () => {
// GIVEN
const stack = testStack();
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 41f2f41

Please sign in to comment.