diff --git a/packages/@aws-cdk/aws-rds/test/integ.instance.lit.expected.json b/packages/@aws-cdk/aws-rds/test/integ.instance.lit.expected.json index 36c5fdc654df2..ccded802da6f0 100644 --- a/packages/@aws-cdk/aws-rds/test/integ.instance.lit.expected.json +++ b/packages/@aws-cdk/aws-rds/test/integ.instance.lit.expected.json @@ -19,11 +19,11 @@ "VPCPublicSubnet1SubnetB4246D30": { "Type": "AWS::EC2::Subnet", "Properties": { - "CidrBlock": "10.0.0.0/18", "VpcId": { "Ref": "VPCB9E5F0B4" }, "AvailabilityZone": "test-region-1a", + "CidrBlock": "10.0.0.0/18", "MapPublicIpOnLaunch": true, "Tags": [ { @@ -116,11 +116,11 @@ "VPCPublicSubnet2Subnet74179F39": { "Type": "AWS::EC2::Subnet", "Properties": { - "CidrBlock": "10.0.64.0/18", "VpcId": { "Ref": "VPCB9E5F0B4" }, "AvailabilityZone": "test-region-1b", + "CidrBlock": "10.0.64.0/18", "MapPublicIpOnLaunch": true, "Tags": [ { @@ -213,11 +213,11 @@ "VPCPrivateSubnet1Subnet8BCA10E0": { "Type": "AWS::EC2::Subnet", "Properties": { - "CidrBlock": "10.0.128.0/18", "VpcId": { "Ref": "VPCB9E5F0B4" }, "AvailabilityZone": "test-region-1a", + "CidrBlock": "10.0.128.0/18", "MapPublicIpOnLaunch": false, "Tags": [ { @@ -275,11 +275,11 @@ "VPCPrivateSubnet2SubnetCFCDAA7A": { "Type": "AWS::EC2::Subnet", "Properties": { - "CidrBlock": "10.0.192.0/18", "VpcId": { "Ref": "VPCB9E5F0B4" }, "AvailabilityZone": "test-region-1b", + "CidrBlock": "10.0.192.0/18", "MapPublicIpOnLaunch": false, "Tags": [ { @@ -628,7 +628,7 @@ "Properties": { "DBInstanceClass": "db.t3.medium", "AllocatedStorage": "100", - "AutoMinorVersionUpgrade": false, + "AutoMinorVersionUpgrade": true, "BackupRetentionPeriod": 7, "CopyTagsToSnapshot": true, "DBName": "ORCL", @@ -696,8 +696,8 @@ } ] }, - "UpdateReplacePolicy": "Snapshot", - "DeletionPolicy": "Snapshot" + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" }, "InstanceLogRetentiontrace487771C8": { "Type": "Custom::LogRetention", diff --git a/packages/@aws-cdk/aws-rds/test/integ.instance.lit.ts b/packages/@aws-cdk/aws-rds/test/integ.instance.lit.ts index 3e869950a0a46..7154c05b8970b 100644 --- a/packages/@aws-cdk/aws-rds/test/integ.instance.lit.ts +++ b/packages/@aws-cdk/aws-rds/test/integ.instance.lit.ts @@ -5,6 +5,7 @@ import * as targets from '@aws-cdk/aws-events-targets'; import * as lambda from '@aws-cdk/aws-lambda'; import * as logs from '@aws-cdk/aws-logs'; import * as cdk from '@aws-cdk/core'; +import { RemovalPolicy } from '@aws-cdk/core'; import * as rds from '../lib'; const app = new cdk.App(); @@ -63,9 +64,10 @@ class DatabaseInstanceStack extends cdk.Stack { 'listener', ], cloudwatchLogsRetention: logs.RetentionDays.ONE_MONTH, - autoMinorVersionUpgrade: false, + autoMinorVersionUpgrade: true, // required to be true if LOCATOR is used in the option group optionGroup, parameterGroup, + removalPolicy: RemovalPolicy.DESTROY, }); // Allow connections on default port from any IPV4 diff --git a/packages/@aws-cdk/aws-rds/test/integ.proxy.expected.json b/packages/@aws-cdk/aws-rds/test/integ.proxy.expected.json index a8eff4138bc50..465915d69d202 100644 --- a/packages/@aws-cdk/aws-rds/test/integ.proxy.expected.json +++ b/packages/@aws-cdk/aws-rds/test/integ.proxy.expected.json @@ -18,11 +18,11 @@ "vpcPublicSubnet1Subnet2E65531E": { "Type": "AWS::EC2::Subnet", "Properties": { - "CidrBlock": "10.0.0.0/18", "VpcId": { "Ref": "vpcA2121C38" }, "AvailabilityZone": "test-region-1a", + "CidrBlock": "10.0.0.0/18", "MapPublicIpOnLaunch": true, "Tags": [ { @@ -115,11 +115,11 @@ "vpcPublicSubnet2Subnet009B674F": { "Type": "AWS::EC2::Subnet", "Properties": { - "CidrBlock": "10.0.64.0/18", "VpcId": { "Ref": "vpcA2121C38" }, "AvailabilityZone": "test-region-1b", + "CidrBlock": "10.0.64.0/18", "MapPublicIpOnLaunch": true, "Tags": [ { @@ -212,11 +212,11 @@ "vpcPrivateSubnet1Subnet934893E8": { "Type": "AWS::EC2::Subnet", "Properties": { - "CidrBlock": "10.0.128.0/18", "VpcId": { "Ref": "vpcA2121C38" }, "AvailabilityZone": "test-region-1a", + "CidrBlock": "10.0.128.0/18", "MapPublicIpOnLaunch": false, "Tags": [ { @@ -274,11 +274,11 @@ "vpcPrivateSubnet2Subnet7031C2BA": { "Type": "AWS::EC2::Subnet", "Properties": { - "CidrBlock": "10.0.192.0/18", "VpcId": { "Ref": "vpcA2121C38" }, "AvailabilityZone": "test-region-1b", + "CidrBlock": "10.0.192.0/18", "MapPublicIpOnLaunch": false, "Tags": [ { @@ -462,7 +462,7 @@ "Ref": "dbInstanceSubnetGroupD062EC9E" }, "Engine": "postgres", - "EngineVersion": "11.5", + "EngineVersion": "11.15", "MasterUsername": { "Fn::Join": [ "", @@ -497,8 +497,8 @@ } ] }, - "UpdateReplacePolicy": "Snapshot", - "DeletionPolicy": "Snapshot" + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" }, "dbProxyIAMRole662F3AB8": { "Type": "AWS::IAM::Role", diff --git a/packages/@aws-cdk/aws-rds/test/integ.proxy.ts b/packages/@aws-cdk/aws-rds/test/integ.proxy.ts index e59ead63f3590..0b67735f5c4e5 100644 --- a/packages/@aws-cdk/aws-rds/test/integ.proxy.ts +++ b/packages/@aws-cdk/aws-rds/test/integ.proxy.ts @@ -1,5 +1,6 @@ import * as ec2 from '@aws-cdk/aws-ec2'; import * as cdk from '@aws-cdk/core'; +import { RemovalPolicy } from '@aws-cdk/core'; import * as rds from '../lib'; const app = new cdk.App(); @@ -9,13 +10,14 @@ const vpc = new ec2.Vpc(stack, 'vpc', { maxAzs: 2 }); const dbInstance = new rds.DatabaseInstance(stack, 'dbInstance', { engine: rds.DatabaseInstanceEngine.postgres({ - version: rds.PostgresEngineVersion.VER_11_5, + version: rds.PostgresEngineVersion.VER_11_15, }), instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE3, ec2.InstanceSize.MEDIUM), credentials: rds.Credentials.fromUsername('master', { excludeCharacters: '"@/\\', }), vpc, + removalPolicy: RemovalPolicy.DESTROY, }); new rds.DatabaseProxy(stack, 'dbProxy', {