From b14cfce214f717a88cc21f1fb9c3619ae82b2677 Mon Sep 17 00:00:00 2001 From: Eli Polonsky Date: Tue, 30 Mar 2021 15:30:35 +0300 Subject: [PATCH] =?UTF-8?q?feat(docdb):=20graduate=20to=20stable=20?= =?UTF-8?q?=F0=9F=9A=80=20=20(#13875)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR also includes some last minute ergonomic changes. BREAKING CHANGE: `DatabaseClusterProps.instanceProps` was hoisted and all its properties are now available one level up directly in `DatabaseClusterProps`. - **docdb**: `DatabaseInstanceProps.instanceClass` renamed to `DatabaseInstanceProps.instanceType`. ---- *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-docdb/README.md | 24 +-- packages/@aws-cdk/aws-docdb/lib/cluster.ts | 51 +++++-- packages/@aws-cdk/aws-docdb/lib/instance.ts | 4 +- packages/@aws-cdk/aws-docdb/lib/props.ts | 40 ----- packages/@aws-cdk/aws-docdb/package.json | 4 +- .../@aws-cdk/aws-docdb/test/cluster.test.ts | 144 ++++++------------ .../@aws-cdk/aws-docdb/test/instance.test.ts | 14 +- .../test/integ.cluster-rotation.lit.ts | 6 +- .../@aws-cdk/aws-docdb/test/integ.cluster.ts | 8 +- 9 files changed, 106 insertions(+), 189 deletions(-) diff --git a/packages/@aws-cdk/aws-docdb/README.md b/packages/@aws-cdk/aws-docdb/README.md index 530942578a090..7121a5dee71bb 100644 --- a/packages/@aws-cdk/aws-docdb/README.md +++ b/packages/@aws-cdk/aws-docdb/README.md @@ -5,17 +5,7 @@ ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) -> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. -> -> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib - -![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) - -> The APIs of higher level constructs in this module are experimental and under active development. -> They are subject to non-backward compatible changes or removal in any future version. These are -> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be -> announced in the release notes. This means that while you may use them, you may need to update -> your source code when upgrading to a newer version of this package. +![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- @@ -32,13 +22,11 @@ const cluster = new DatabaseCluster(this, 'Database', { masterUser: { username: 'myuser' // NOTE: 'admin' is reserved by DocumentDB }, - instanceProps: { - instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.LARGE), - vpcSubnets: { - subnetType: ec2.SubnetType.PUBLIC, - }, - vpc - } + instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.LARGE), + vpcSubnets: { + subnetType: ec2.SubnetType.PUBLIC, + }, + vpc }); ``` diff --git a/packages/@aws-cdk/aws-docdb/lib/cluster.ts b/packages/@aws-cdk/aws-docdb/lib/cluster.ts index f60a332d1b77f..71df7275d5cba 100644 --- a/packages/@aws-cdk/aws-docdb/lib/cluster.ts +++ b/packages/@aws-cdk/aws-docdb/lib/cluster.ts @@ -8,7 +8,7 @@ import { DatabaseSecret } from './database-secret'; import { CfnDBCluster, CfnDBInstance, CfnDBSubnetGroup } from './docdb.generated'; import { Endpoint } from './endpoint'; import { IClusterParameterGroup } from './parameter-group'; -import { BackupProps, InstanceProps, Login, RotationMultiUserOptions } from './props'; +import { BackupProps, Login, RotationMultiUserOptions } from './props'; /** * Properties for a new database cluster @@ -82,9 +82,37 @@ export interface DatabaseClusterProps { readonly instanceIdentifierBase?: string; /** - * Settings for the individual instances that are launched + * What type of instance to start for the replicas */ - readonly instanceProps: InstanceProps; + readonly instanceType: ec2.InstanceType; + + /** + * What subnets to run the DocumentDB instances in. + * + * Must be at least 2 subnets in two different AZs. + */ + readonly vpc: ec2.IVpc; + + /** + * Where to place the instances within the VPC + * + * @default private subnets + */ + readonly vpcSubnets?: ec2.SubnetSelection; + + /** + * Security group. + * + * @default a new security group is created. + */ + readonly securityGroup?: ec2.ISecurityGroup; + + /** + * The DB parameter group to associate with the instance. + * + * @default no parameter group + */ + readonly parameterGroup?: IClusterParameterGroup; /** * A weekly time range in which maintenance should preferably execute. @@ -99,13 +127,6 @@ export interface DatabaseClusterProps { */ readonly preferredMaintenanceWindow?: string; - /** - * Additional parameters to pass to the database engine - * - * @default - No parameter group. - */ - readonly parameterGroup?: IClusterParameterGroup; - /** * The removal policy to apply when the cluster and its instances are removed * or replaced during a stack update, or when the stack is deleted. This @@ -275,8 +296,8 @@ export class DatabaseCluster extends DatabaseClusterBase { constructor(scope: Construct, id: string, props: DatabaseClusterProps) { super(scope, id); - this.vpc = props.instanceProps.vpc; - this.vpcSubnets = props.instanceProps.vpcSubnets; + this.vpc = props.vpc; + this.vpcSubnets = props.vpcSubnets; // Determine the subnet(s) to deploy the DocDB cluster to const { subnetIds, internetConnectivityEstablished } = this.vpc.selectSubnets(this.vpcSubnets); @@ -295,8 +316,8 @@ export class DatabaseCluster extends DatabaseClusterBase { // Create the security group for the DB cluster let securityGroup: ec2.ISecurityGroup; - if (props.instanceProps.securityGroup) { - securityGroup = props.instanceProps.securityGroup; + if (props.securityGroup) { + securityGroup = props.securityGroup; } else { securityGroup = new ec2.SecurityGroup(this, 'SecurityGroup', { description: 'DocumentDB security group', @@ -381,7 +402,7 @@ export class DatabaseCluster extends DatabaseClusterBase { dbClusterIdentifier: cluster.ref, dbInstanceIdentifier: instanceIdentifier, // Instance properties - dbInstanceClass: databaseInstanceType(props.instanceProps.instanceType), + dbInstanceClass: databaseInstanceType(props.instanceType), }); instance.applyRemovalPolicy(props.removalPolicy, { diff --git a/packages/@aws-cdk/aws-docdb/lib/instance.ts b/packages/@aws-cdk/aws-docdb/lib/instance.ts index 3208bda7107f7..a7563cb601388 100644 --- a/packages/@aws-cdk/aws-docdb/lib/instance.ts +++ b/packages/@aws-cdk/aws-docdb/lib/instance.ts @@ -120,7 +120,7 @@ export interface DatabaseInstanceProps { /** * The name of the compute and memory capacity classes. */ - readonly instanceClass: ec2.InstanceType; + readonly instanceType: ec2.InstanceType; /** * The name of the Availability Zone where the DB instance will be located. @@ -202,7 +202,7 @@ export class DatabaseInstance extends DatabaseInstanceBase implements IDatabaseI const instance = new CfnDBInstance(this, 'Resource', { dbClusterIdentifier: props.cluster.clusterIdentifier, - dbInstanceClass: `db.${props.instanceClass}`, + dbInstanceClass: `db.${props.instanceType}`, autoMinorVersionUpgrade: props.autoMinorVersionUpgrade ?? true, availabilityZone: props.availabilityZone, dbInstanceIdentifier: props.dbInstanceName, diff --git a/packages/@aws-cdk/aws-docdb/lib/props.ts b/packages/@aws-cdk/aws-docdb/lib/props.ts index 270bc51cdc203..9cd24b1fce1bc 100644 --- a/packages/@aws-cdk/aws-docdb/lib/props.ts +++ b/packages/@aws-cdk/aws-docdb/lib/props.ts @@ -1,8 +1,6 @@ -import * as ec2 from '@aws-cdk/aws-ec2'; import * as kms from '@aws-cdk/aws-kms'; import * as secretsmanager from '@aws-cdk/aws-secretsmanager'; import { Duration, SecretValue } from '@aws-cdk/core'; -import { IClusterParameterGroup } from './parameter-group'; /** * Backup configuration for DocumentDB databases @@ -57,44 +55,6 @@ export interface Login { readonly kmsKey?: kms.IKey; } -/** - * Instance properties for database instances - */ -export interface InstanceProps { - /** - * What type of instance to start for the replicas - */ - readonly instanceType: ec2.InstanceType; - - /** - * What subnets to run the DocumentDB instances in. - * - * Must be at least 2 subnets in two different AZs. - */ - readonly vpc: ec2.IVpc; - - /** - * Where to place the instances within the VPC - * - * @default private subnets - */ - readonly vpcSubnets?: ec2.SubnetSelection; - - /** - * Security group. - * - * @default a new security group is created. - */ - readonly securityGroup?: ec2.ISecurityGroup; - - /** - * The DB parameter group to associate with the instance. - * - * @default no parameter group - */ - readonly parameterGroup?: IClusterParameterGroup; -} - /** * Options to add the multi user rotation */ diff --git a/packages/@aws-cdk/aws-docdb/package.json b/packages/@aws-cdk/aws-docdb/package.json index 8442223e41977..b9b4f70a7030c 100644 --- a/packages/@aws-cdk/aws-docdb/package.json +++ b/packages/@aws-cdk/aws-docdb/package.json @@ -104,8 +104,8 @@ "attribute-tag:@aws-cdk/aws-docdb.DatabaseSecret.secretName" ] }, - "stability": "experimental", - "maturity": "experimental", + "stability": "stable", + "maturity": "stable", "awscdkio": { "announce": false }, diff --git a/packages/@aws-cdk/aws-docdb/test/cluster.test.ts b/packages/@aws-cdk/aws-docdb/test/cluster.test.ts index f227293310bf3..a868ff2bf83e9 100644 --- a/packages/@aws-cdk/aws-docdb/test/cluster.test.ts +++ b/packages/@aws-cdk/aws-docdb/test/cluster.test.ts @@ -18,10 +18,8 @@ describe('DatabaseCluster', () => { username: 'admin', password: cdk.SecretValue.plainText('tooshort'), }, - instanceProps: { - instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), - vpc, - }, + instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), + vpc, }); // THEN @@ -63,10 +61,8 @@ describe('DatabaseCluster', () => { username: 'admin', password: cdk.SecretValue.plainText('tooshort'), }, - instanceProps: { - instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), - vpc, - }, + instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), + vpc, }); // THEN @@ -90,10 +86,8 @@ describe('DatabaseCluster', () => { masterUser: { username: 'admin', }, - instanceProps: { - vpc, - instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.LARGE), - }, + vpc, + instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.LARGE), }); }).toThrowError('At least one instance is required'); }); @@ -112,12 +106,10 @@ describe('DatabaseCluster', () => { masterUser: { username: 'admin', }, - instanceProps: { - vpc, - instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.LARGE), - vpcSubnets: { - subnetType: ec2.SubnetType.PRIVATE, - }, + vpc, + instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.LARGE), + vpcSubnets: { + subnetType: ec2.SubnetType.PRIVATE, }, }); }).toThrowError('Cluster requires at least 2 subnets, got 1'); @@ -134,10 +126,8 @@ describe('DatabaseCluster', () => { masterUser: { username: 'admin', }, - instanceProps: { - instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), - vpc, - }, + instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), + vpc, }); // THEN @@ -163,11 +153,9 @@ describe('DatabaseCluster', () => { username: 'admin', password: cdk.SecretValue.plainText('tooshort'), }, - instanceProps: { - instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), - vpc, - securityGroup: sg, - }, + instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), + vpc, + securityGroup: sg, }); // THEN @@ -197,10 +185,8 @@ describe('DatabaseCluster', () => { username: 'admin', password: cdk.SecretValue.plainText('tooshort'), }, - instanceProps: { - instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), - vpc, - }, + instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), + vpc, parameterGroup: group, }); @@ -223,10 +209,8 @@ describe('DatabaseCluster', () => { username: 'admin', password: cdk.SecretValue.plainText('tooshort'), }, - instanceProps: { - instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), - vpc, - }, + instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), + vpc, parameterGroup: group, }); @@ -246,10 +230,8 @@ describe('DatabaseCluster', () => { masterUser: { username: 'admin', }, - instanceProps: { - instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), - vpc, - }, + instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), + vpc, }); // THEN @@ -300,10 +282,8 @@ describe('DatabaseCluster', () => { masterUser: { username: 'admin', }, - instanceProps: { - instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), - vpc, - }, + instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), + vpc, kmsKey: new kms.Key(stack, 'Key'), }); @@ -329,10 +309,8 @@ describe('DatabaseCluster', () => { masterUser: { username: 'admin', }, - instanceProps: { - instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), - vpc, - }, + instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), + vpc, }); // THEN @@ -352,10 +330,8 @@ describe('DatabaseCluster', () => { masterUser: { username: 'admin', }, - instanceProps: { - instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), - vpc, - }, + instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), + vpc, kmsKey: new kms.Key(stack, 'Key'), storageEncrypted: false, }); @@ -375,10 +351,8 @@ describe('DatabaseCluster', () => { masterUser: { username: 'admin', }, - instanceProps: { - instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), - vpc, - }, + instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), + vpc, }); // THEN @@ -396,10 +370,8 @@ describe('DatabaseCluster', () => { masterUser: { username: 'admin', }, - instanceProps: { - vpc, - instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.SMALL), - }, + vpc, + instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.SMALL), instanceIdentifierBase, }); @@ -420,10 +392,8 @@ describe('DatabaseCluster', () => { masterUser: { username: 'admin', }, - instanceProps: { - vpc, - instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.SMALL), - }, + vpc, + instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.SMALL), dbClusterName: clusterIdentifier, }); @@ -494,10 +464,8 @@ describe('DatabaseCluster', () => { masterUser: { username: 'admin', }, - instanceProps: { - vpc, - instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.SMALL), - }, + vpc, + instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.SMALL), backup: { retention: cdk.Duration.days(20), }, @@ -519,10 +487,8 @@ describe('DatabaseCluster', () => { masterUser: { username: 'admin', }, - instanceProps: { - vpc, - instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.SMALL), - }, + vpc, + instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.SMALL), backup: { retention: cdk.Duration.days(20), preferredWindow: '07:34-08:04', @@ -546,10 +512,8 @@ describe('DatabaseCluster', () => { masterUser: { username: 'admin', }, - instanceProps: { - vpc, - instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.SMALL), - }, + vpc, + instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.SMALL), preferredMaintenanceWindow: '07:34-08:04', }); @@ -567,10 +531,8 @@ describe('DatabaseCluster', () => { masterUser: { username: 'admin', }, - instanceProps: { - vpc, - instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.SMALL), - }, + vpc, + instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.SMALL), }); // WHEN @@ -630,10 +592,8 @@ describe('DatabaseCluster', () => { username: 'admin', password: cdk.SecretValue.plainText('secret'), }, - instanceProps: { - vpc, - instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.SMALL), - }, + vpc, + instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.SMALL), }); // WHEN @@ -653,10 +613,8 @@ describe('DatabaseCluster', () => { masterUser: { username: 'admin', }, - instanceProps: { - vpc, - instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.SMALL), - }, + vpc, + instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.SMALL), }); // WHEN @@ -677,10 +635,8 @@ describe('DatabaseCluster', () => { masterUser: { username: 'admin', }, - instanceProps: { - vpc, - instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.SMALL), - }, + vpc, + instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.SMALL), }); const userSecret = new DatabaseSecret(stack, 'UserSecret', { username: 'seconduser', @@ -749,10 +705,8 @@ describe('DatabaseCluster', () => { username: 'admin', password: cdk.SecretValue.plainText('secret'), }, - instanceProps: { - vpc, - instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.SMALL), - }, + vpc, + instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.SMALL), }); const userSecret = new DatabaseSecret(stack, 'UserSecret', { username: 'seconduser', diff --git a/packages/@aws-cdk/aws-docdb/test/instance.test.ts b/packages/@aws-cdk/aws-docdb/test/instance.test.ts index b3785e700ca01..afb16ef61a773 100644 --- a/packages/@aws-cdk/aws-docdb/test/instance.test.ts +++ b/packages/@aws-cdk/aws-docdb/test/instance.test.ts @@ -17,7 +17,7 @@ describe('DatabaseInstance', () => { // WHEN new DatabaseInstance(stack, 'Instance', { cluster: stack.cluster, - instanceClass: SINGLE_INSTANCE_TYPE, + instanceType: SINGLE_INSTANCE_TYPE, }); // THEN @@ -43,7 +43,7 @@ describe('DatabaseInstance', () => { // WHEN new DatabaseInstance(stack, 'Instance', { cluster: stack.cluster, - instanceClass: SINGLE_INSTANCE_TYPE, + instanceType: SINGLE_INSTANCE_TYPE, autoMinorVersionUpgrade: given, }); @@ -64,7 +64,7 @@ describe('DatabaseInstance', () => { const stack = testStack(); const instance = new DatabaseInstance(stack, 'Instance', { cluster: stack.cluster, - instanceClass: SINGLE_INSTANCE_TYPE, + instanceType: SINGLE_INSTANCE_TYPE, }); const exportName = 'DbInstanceEndpoint'; @@ -95,7 +95,7 @@ describe('DatabaseInstance', () => { const stack = testStack(); const instance = new DatabaseInstance(stack, 'Instance', { cluster: stack.cluster, - instanceClass: SINGLE_INSTANCE_TYPE, + instanceType: SINGLE_INSTANCE_TYPE, }); const exportName = 'DbInstanceArn'; @@ -182,10 +182,8 @@ class TestStack extends cdk.Stack { username: 'admin', password: cdk.SecretValue.plainText('tooshort'), }, - instanceProps: { - instanceType: CLUSTER_INSTANCE_TYPE, - vpc: this.vpc, - }, + instanceType: CLUSTER_INSTANCE_TYPE, + vpc: this.vpc, }); } } diff --git a/packages/@aws-cdk/aws-docdb/test/integ.cluster-rotation.lit.ts b/packages/@aws-cdk/aws-docdb/test/integ.cluster-rotation.lit.ts index e8c6ed141e1f9..ae655dd213a4d 100644 --- a/packages/@aws-cdk/aws-docdb/test/integ.cluster-rotation.lit.ts +++ b/packages/@aws-cdk/aws-docdb/test/integ.cluster-rotation.lit.ts @@ -20,10 +20,8 @@ const cluster = new docdb.DatabaseCluster(stack, 'Database', { masterUser: { username: 'docdb', }, - instanceProps: { - instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.LARGE), - vpc, - }, + instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.LARGE), + vpc, removalPolicy: cdk.RemovalPolicy.DESTROY, }); diff --git a/packages/@aws-cdk/aws-docdb/test/integ.cluster.ts b/packages/@aws-cdk/aws-docdb/test/integ.cluster.ts index 5e7b2049507aa..084502d0dae65 100644 --- a/packages/@aws-cdk/aws-docdb/test/integ.cluster.ts +++ b/packages/@aws-cdk/aws-docdb/test/integ.cluster.ts @@ -35,11 +35,9 @@ class TestStack extends cdk.Stack { username: 'docdb', password: cdk.SecretValue.plainText('7959866cacc02c2d243ecfe177464fe6'), }, - instanceProps: { - instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.LARGE), - vpcSubnets: { subnetType: ec2.SubnetType.PUBLIC }, - vpc, - }, + instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.LARGE), + vpcSubnets: { subnetType: ec2.SubnetType.PUBLIC }, + vpc, parameterGroup: params, kmsKey, removalPolicy: cdk.RemovalPolicy.DESTROY,