diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-docdb/test/integ.cluster-retain.js.snapshot/DocdbTestDefaultTestDeployAssertA0429289.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-docdb/test/integ.cluster-retain.js.snapshot/DocdbTestDefaultTestDeployAssertA0429289.assets.json new file mode 100644 index 0000000000000..442b4437915e8 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-docdb/test/integ.cluster-retain.js.snapshot/DocdbTestDefaultTestDeployAssertA0429289.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "DocdbTestDefaultTestDeployAssertA0429289.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-docdb/test/integ.cluster-retain.js.snapshot/DocdbTestDefaultTestDeployAssertA0429289.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-docdb/test/integ.cluster-retain.js.snapshot/DocdbTestDefaultTestDeployAssertA0429289.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-docdb/test/integ.cluster-retain.js.snapshot/DocdbTestDefaultTestDeployAssertA0429289.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-docdb/test/integ.cluster-retain.js.snapshot/aws-cdk-docdb-integ-cluster-retain.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-docdb/test/integ.cluster-retain.js.snapshot/aws-cdk-docdb-integ-cluster-retain.assets.json new file mode 100644 index 0000000000000..9a4b11fac717a --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-docdb/test/integ.cluster-retain.js.snapshot/aws-cdk-docdb-integ-cluster-retain.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "7968486d71e57b599c993cdc5f807b685d3730d06495fef5541905752ae14651": { + "source": { + "path": "aws-cdk-docdb-integ-cluster-retain.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "7968486d71e57b599c993cdc5f807b685d3730d06495fef5541905752ae14651.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-docdb/test/integ.cluster-retain.js.snapshot/aws-cdk-docdb-integ-cluster-retain.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-docdb/test/integ.cluster-retain.js.snapshot/aws-cdk-docdb-integ-cluster-retain.template.json new file mode 100644 index 0000000000000..83ac15600aed2 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-docdb/test/integ.cluster-retain.js.snapshot/aws-cdk-docdb-integ-cluster-retain.template.json @@ -0,0 +1,160 @@ +{ + "Resources": { + "DatabaseSubnets56F17B9A": { + "Type": "AWS::DocDB::DBSubnetGroup", + "Properties": { + "DBSubnetGroupDescription": "Subnets for Database database", + "SubnetIds": [ + "subnet-06fd4260", + "subnet-63883242", + "subnet-a3521dee", + "subnet-88b40cd7", + "subnet-3a18db0b", + "subnet-1f760711" + ] + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "DatabaseSecurityGroup5C91FDCB": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "DocumentDB security group", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "VpcId": "vpc-196aa264" + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "DatabaseSecret3B817195": { + "Type": "AWS::SecretsManager::Secret", + "Properties": { + "Description": { + "Fn::Join": [ + "", + [ + "Generated by the CDK for stack: ", + { + "Ref": "AWS::StackName" + } + ] + ] + }, + "GenerateSecretString": { + "ExcludeCharacters": "\"@/", + "GenerateStringKey": "password", + "PasswordLength": 41, + "SecretStringTemplate": "{\"username\":\"clusteradmin\"}" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "DatabaseSecretAttachmentE5D1B020": { + "Type": "AWS::SecretsManager::SecretTargetAttachment", + "Properties": { + "SecretId": { + "Ref": "DatabaseSecret3B817195" + }, + "TargetId": { + "Ref": "DatabaseB269D8BB" + }, + "TargetType": "AWS::DocDB::DBCluster" + } + }, + "DatabaseB269D8BB": { + "Type": "AWS::DocDB::DBCluster", + "Properties": { + "DBSubnetGroupName": { + "Ref": "DatabaseSubnets56F17B9A" + }, + "MasterUserPassword": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "DatabaseSecret3B817195" + }, + ":SecretString:password::}}" + ] + ] + }, + "MasterUsername": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "DatabaseSecret3B817195" + }, + ":SecretString:username::}}" + ] + ] + }, + "StorageEncrypted": true, + "VpcSecurityGroupIds": [ + { + "Fn::GetAtt": [ + "DatabaseSecurityGroup5C91FDCB", + "GroupId" + ] + } + ] + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "DatabaseInstance1844F58FD": { + "Type": "AWS::DocDB::DBInstance", + "Properties": { + "DBClusterIdentifier": { + "Ref": "DatabaseB269D8BB" + }, + "DBInstanceClass": "db.t3.medium" + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-docdb/test/integ.cluster-retain.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-docdb/test/integ.cluster-retain.js.snapshot/cdk.out new file mode 100644 index 0000000000000..1f0068d32659a --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-docdb/test/integ.cluster-retain.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"36.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-docdb/test/integ.cluster-retain.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-docdb/test/integ.cluster-retain.js.snapshot/integ.json new file mode 100644 index 0000000000000..9213144d0fe81 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-docdb/test/integ.cluster-retain.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "36.0.0", + "testCases": { + "DocdbTest/DefaultTest": { + "stacks": [ + "aws-cdk-docdb-integ-cluster-retain" + ], + "assertionStack": "DocdbTest/DefaultTest/DeployAssert", + "assertionStackName": "DocdbTestDefaultTestDeployAssertA0429289" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-docdb/test/integ.cluster-retain.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-docdb/test/integ.cluster-retain.js.snapshot/manifest.json new file mode 100644 index 0000000000000..16516e8d5dd62 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-docdb/test/integ.cluster-retain.js.snapshot/manifest.json @@ -0,0 +1,143 @@ +{ + "version": "36.0.0", + "artifacts": { + "aws-cdk-docdb-integ-cluster-retain.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-cdk-docdb-integ-cluster-retain.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-cdk-docdb-integ-cluster-retain": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-cdk-docdb-integ-cluster-retain.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/7968486d71e57b599c993cdc5f807b685d3730d06495fef5541905752ae14651.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-cdk-docdb-integ-cluster-retain.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "aws-cdk-docdb-integ-cluster-retain.assets" + ], + "metadata": { + "/aws-cdk-docdb-integ-cluster-retain/Database/Subnets": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseSubnets56F17B9A" + } + ], + "/aws-cdk-docdb-integ-cluster-retain/Database/SecurityGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseSecurityGroup5C91FDCB" + } + ], + "/aws-cdk-docdb-integ-cluster-retain/Database/Secret/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseSecret3B817195" + } + ], + "/aws-cdk-docdb-integ-cluster-retain/Database/Secret/Attachment/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseSecretAttachmentE5D1B020" + } + ], + "/aws-cdk-docdb-integ-cluster-retain/Database/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseB269D8BB" + } + ], + "/aws-cdk-docdb-integ-cluster-retain/Database/Instance1": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseInstance1844F58FD" + } + ], + "/aws-cdk-docdb-integ-cluster-retain/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-cdk-docdb-integ-cluster-retain/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-cdk-docdb-integ-cluster-retain" + }, + "DocdbTestDefaultTestDeployAssertA0429289.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "DocdbTestDefaultTestDeployAssertA0429289.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "DocdbTestDefaultTestDeployAssertA0429289": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "DocdbTestDefaultTestDeployAssertA0429289.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "DocdbTestDefaultTestDeployAssertA0429289.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "DocdbTestDefaultTestDeployAssertA0429289.assets" + ], + "metadata": { + "/DocdbTest/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/DocdbTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "DocdbTest/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-docdb/test/integ.cluster-retain.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-docdb/test/integ.cluster-retain.js.snapshot/tree.json new file mode 100644 index 0000000000000..99880029c89c1 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-docdb/test/integ.cluster-retain.js.snapshot/tree.json @@ -0,0 +1,359 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "aws-cdk-docdb-integ-cluster-retain": { + "id": "aws-cdk-docdb-integ-cluster-retain", + "path": "aws-cdk-docdb-integ-cluster-retain", + "children": { + "VPC": { + "id": "VPC", + "path": "aws-cdk-docdb-integ-cluster-retain/VPC", + "children": { + "PublicSubnet1": { + "id": "PublicSubnet1", + "path": "aws-cdk-docdb-integ-cluster-retain/VPC/PublicSubnet1", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "PublicSubnet2": { + "id": "PublicSubnet2", + "path": "aws-cdk-docdb-integ-cluster-retain/VPC/PublicSubnet2", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "PublicSubnet3": { + "id": "PublicSubnet3", + "path": "aws-cdk-docdb-integ-cluster-retain/VPC/PublicSubnet3", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "PublicSubnet4": { + "id": "PublicSubnet4", + "path": "aws-cdk-docdb-integ-cluster-retain/VPC/PublicSubnet4", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "PublicSubnet5": { + "id": "PublicSubnet5", + "path": "aws-cdk-docdb-integ-cluster-retain/VPC/PublicSubnet5", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "PublicSubnet6": { + "id": "PublicSubnet6", + "path": "aws-cdk-docdb-integ-cluster-retain/VPC/PublicSubnet6", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Database": { + "id": "Database", + "path": "aws-cdk-docdb-integ-cluster-retain/Database", + "children": { + "Subnets": { + "id": "Subnets", + "path": "aws-cdk-docdb-integ-cluster-retain/Database/Subnets", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::DocDB::DBSubnetGroup", + "aws:cdk:cloudformation:props": { + "dbSubnetGroupDescription": "Subnets for Database database", + "subnetIds": [ + "subnet-06fd4260", + "subnet-63883242", + "subnet-a3521dee", + "subnet-88b40cd7", + "subnet-3a18db0b", + "subnet-1f760711" + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_docdb.CfnDBSubnetGroup", + "version": "0.0.0" + } + }, + "SecurityGroup": { + "id": "SecurityGroup", + "path": "aws-cdk-docdb-integ-cluster-retain/Database/SecurityGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-docdb-integ-cluster-retain/Database/SecurityGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", + "aws:cdk:cloudformation:props": { + "groupDescription": "DocumentDB security group", + "securityGroupEgress": [ + { + "cidrIp": "0.0.0.0/0", + "description": "Allow all outbound traffic by default", + "ipProtocol": "-1" + } + ], + "vpcId": "vpc-196aa264" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" + } + }, + "Secret": { + "id": "Secret", + "path": "aws-cdk-docdb-integ-cluster-retain/Database/Secret", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-docdb-integ-cluster-retain/Database/Secret/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SecretsManager::Secret", + "aws:cdk:cloudformation:props": { + "description": { + "Fn::Join": [ + "", + [ + "Generated by the CDK for stack: ", + { + "Ref": "AWS::StackName" + } + ] + ] + }, + "generateSecretString": { + "passwordLength": 41, + "secretStringTemplate": "{\"username\":\"clusteradmin\"}", + "generateStringKey": "password", + "excludeCharacters": "\"@/" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_secretsmanager.CfnSecret", + "version": "0.0.0" + } + }, + "Attachment": { + "id": "Attachment", + "path": "aws-cdk-docdb-integ-cluster-retain/Database/Secret/Attachment", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-docdb-integ-cluster-retain/Database/Secret/Attachment/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SecretsManager::SecretTargetAttachment", + "aws:cdk:cloudformation:props": { + "secretId": { + "Ref": "DatabaseSecret3B817195" + }, + "targetId": { + "Ref": "DatabaseB269D8BB" + }, + "targetType": "AWS::DocDB::DBCluster" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_secretsmanager.CfnSecretTargetAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_secretsmanager.SecretTargetAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_docdb.DatabaseSecret", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-docdb-integ-cluster-retain/Database/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::DocDB::DBCluster", + "aws:cdk:cloudformation:props": { + "dbSubnetGroupName": { + "Ref": "DatabaseSubnets56F17B9A" + }, + "masterUsername": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "DatabaseSecret3B817195" + }, + ":SecretString:username::}}" + ] + ] + }, + "masterUserPassword": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "DatabaseSecret3B817195" + }, + ":SecretString:password::}}" + ] + ] + }, + "storageEncrypted": true, + "vpcSecurityGroupIds": [ + { + "Fn::GetAtt": [ + "DatabaseSecurityGroup5C91FDCB", + "GroupId" + ] + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_docdb.CfnDBCluster", + "version": "0.0.0" + } + }, + "Instance1": { + "id": "Instance1", + "path": "aws-cdk-docdb-integ-cluster-retain/Database/Instance1", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::DocDB::DBInstance", + "aws:cdk:cloudformation:props": { + "dbClusterIdentifier": { + "Ref": "DatabaseB269D8BB" + }, + "dbInstanceClass": "db.t3.medium" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_docdb.CfnDBInstance", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_docdb.DatabaseCluster", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-cdk-docdb-integ-cluster-retain/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-cdk-docdb-integ-cluster-retain/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "DocdbTest": { + "id": "DocdbTest", + "path": "DocdbTest", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "DocdbTest/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "DocdbTest/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "DocdbTest/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "DocdbTest/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "DocdbTest/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-docdb/test/integ.cluster-retain.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-docdb/test/integ.cluster-retain.ts new file mode 100644 index 0000000000000..24b83fe88b615 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-docdb/test/integ.cluster-retain.ts @@ -0,0 +1,23 @@ +import * as ec2 from "aws-cdk-lib/aws-ec2"; +import * as cdk from "aws-cdk-lib"; +import { DatabaseCluster } from "aws-cdk-lib/aws-docdb"; +import * as integ from "@aws-cdk/integ-tests-alpha"; + +const app = new cdk.App(); + +const stack = new cdk.Stack(app, "aws-cdk-docdb-integ-cluster-retain"); + +const vpc = ec2.Vpc.fromLookup(stack, "VPC", { isDefault: true }); +const db = new DatabaseCluster(stack, "Database", { + masterUser: { username: "clusteradmin" }, + instanceType: ec2.InstanceType.of( + ec2.InstanceClass.T3, + ec2.InstanceSize.MEDIUM + ), + vpc, + removalPolicy: cdk.RemovalPolicy.RETAIN, +}); + +new integ.IntegTest(app, "DocdbTest", { + testCases: [stack], +});