diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-database-insights.js.snapshot/aws-cdk-rds-integ-instance-database-insights.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-database-insights.js.snapshot/aws-cdk-rds-integ-instance-database-insights.assets.json new file mode 100644 index 0000000000000..7426b9043ae84 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-database-insights.js.snapshot/aws-cdk-rds-integ-instance-database-insights.assets.json @@ -0,0 +1,20 @@ +{ + "version": "44.0.0", + "files": { + "b3df55b210167c31e441e7c0ea1b2ce00dee95c729733faf9078a16b7ce1f098": { + "displayName": "aws-cdk-rds-integ-instance-database-insights Template", + "source": { + "path": "aws-cdk-rds-integ-instance-database-insights.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "b3df55b210167c31e441e7c0ea1b2ce00dee95c729733faf9078a16b7ce1f098.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-rds/test/integ.instance-database-insights.js.snapshot/aws-cdk-rds-integ-instance-database-insights.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-database-insights.js.snapshot/aws-cdk-rds-integ-instance-database-insights.template.json new file mode 100644 index 0000000000000..6063519d249c8 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-database-insights.js.snapshot/aws-cdk-rds-integ-instance-database-insights.template.json @@ -0,0 +1,663 @@ +{ + "Resources": { + "VPCB9E5F0B4": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ-instance-database-insights/VPC" + } + ] + } + }, + "VPCPublicSubnet1SubnetB4246D30": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.0.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPublicSubnet1RouteTableFEE4B781": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPublicSubnet1RouteTableAssociation0B0896DC": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + } + } + }, + "VPCPublicSubnet1DefaultRoute91CEF279": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "RouteTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet1EIP6AD938E8": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1NATGatewayE0556630": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet1EIP6AD938E8", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet1" + } + ] + }, + "DependsOn": [ + "VPCPublicSubnet1DefaultRoute91CEF279", + "VPCPublicSubnet1RouteTableAssociation0B0896DC" + ] + }, + "VPCPublicSubnet2Subnet74179F39": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.64.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet2" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPublicSubnet2RouteTable6F1A15F1": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet2" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPublicSubnet2RouteTableAssociation5A808732": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + } + }, + "VPCPublicSubnet2DefaultRouteB7481BBA": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "RouteTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet2EIP4947BC00": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2NATGateway3C070193": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet2EIP4947BC00", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet2" + } + ] + }, + "DependsOn": [ + "VPCPublicSubnet2DefaultRouteB7481BBA", + "VPCPublicSubnet2RouteTableAssociation5A808732" + ] + }, + "VPCPrivateSubnet1Subnet8BCA10E0": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.128.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPrivateSubnet1RouteTableBE8A6027": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPrivateSubnet1RouteTableAssociation347902D1": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + } + } + }, + "VPCPrivateSubnet1DefaultRouteAE1D6490": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet1NATGatewayE0556630" + }, + "RouteTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + } + } + }, + "VPCPrivateSubnet2SubnetCFCDAA7A": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.192.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet2" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPrivateSubnet2RouteTable0A19E10E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet2" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPrivateSubnet2RouteTableAssociation0C73D413": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + } + }, + "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet2NATGateway3C070193" + }, + "RouteTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + } + } + }, + "VPCIGWB7E252D3": { + "Type": "AWS::EC2::InternetGateway", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-rds-integ-instance-database-insights/VPC" + } + ] + } + }, + "VPCVPCGW99B986DC": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "InternetGatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "PostgresInstanceAdvancedSubnetGroupB2B995B8": { + "Type": "AWS::RDS::DBSubnetGroup", + "Properties": { + "DBSubnetGroupDescription": "Subnet group for PostgresInstanceAdvanced database", + "SubnetIds": [ + { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + }, + { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + ] + } + }, + "PostgresInstanceAdvancedSecurityGroupF152AE03": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "Security group for PostgresInstanceAdvanced database", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "PostgresInstanceAdvancedSecret375E0EBD": { + "Type": "AWS::SecretsManager::Secret", + "Properties": { + "Description": { + "Fn::Join": [ + "", + [ + "Generated by the CDK for stack: ", + { + "Ref": "AWS::StackName" + } + ] + ] + }, + "GenerateSecretString": { + "ExcludeCharacters": " %+~`#$&*()|[]{}:;<>?!'/@\"\\", + "GenerateStringKey": "password", + "PasswordLength": 30, + "SecretStringTemplate": "{\"username\":\"postgres\"}" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "PostgresInstanceAdvancedSecretAttachment90DDD610": { + "Type": "AWS::SecretsManager::SecretTargetAttachment", + "Properties": { + "SecretId": { + "Ref": "PostgresInstanceAdvancedSecret375E0EBD" + }, + "TargetId": { + "Ref": "PostgresInstanceAdvanced78DE40A9" + }, + "TargetType": "AWS::RDS::DBInstance" + } + }, + "PostgresInstanceAdvanced78DE40A9": { + "Type": "AWS::RDS::DBInstance", + "Properties": { + "AllocatedStorage": "100", + "CopyTagsToSnapshot": true, + "DBInstanceClass": "db.r5.large", + "DBSubnetGroupName": { + "Ref": "PostgresInstanceAdvancedSubnetGroupB2B995B8" + }, + "DatabaseInsightsMode": "advanced", + "EnablePerformanceInsights": true, + "Engine": "postgres", + "EngineVersion": "16.9", + "MasterUserPassword": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "PostgresInstanceAdvancedSecret375E0EBD" + }, + ":SecretString:password::}}" + ] + ] + }, + "MasterUsername": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "PostgresInstanceAdvancedSecret375E0EBD" + }, + ":SecretString:username::}}" + ] + ] + }, + "PerformanceInsightsRetentionPeriod": 465, + "StorageType": "gp2", + "VPCSecurityGroups": [ + { + "Fn::GetAtt": [ + "PostgresInstanceAdvancedSecurityGroupF152AE03", + "GroupId" + ] + } + ] + }, + "UpdateReplacePolicy": "Snapshot", + "DeletionPolicy": "Snapshot" + }, + "PostgresInstanceStandardSubnetGroupAE72F91C": { + "Type": "AWS::RDS::DBSubnetGroup", + "Properties": { + "DBSubnetGroupDescription": "Subnet group for PostgresInstanceStandard database", + "SubnetIds": [ + { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + }, + { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + ] + } + }, + "PostgresInstanceStandardSecurityGroupBF0F1D98": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "Security group for PostgresInstanceStandard database", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "PostgresInstanceStandardSecret9BC49B1C": { + "Type": "AWS::SecretsManager::Secret", + "Properties": { + "Description": { + "Fn::Join": [ + "", + [ + "Generated by the CDK for stack: ", + { + "Ref": "AWS::StackName" + } + ] + ] + }, + "GenerateSecretString": { + "ExcludeCharacters": " %+~`#$&*()|[]{}:;<>?!'/@\"\\", + "GenerateStringKey": "password", + "PasswordLength": 30, + "SecretStringTemplate": "{\"username\":\"postgres\"}" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "PostgresInstanceStandardSecretAttachment7B1E2D14": { + "Type": "AWS::SecretsManager::SecretTargetAttachment", + "Properties": { + "SecretId": { + "Ref": "PostgresInstanceStandardSecret9BC49B1C" + }, + "TargetId": { + "Ref": "PostgresInstanceStandard5A15059B" + }, + "TargetType": "AWS::RDS::DBInstance" + } + }, + "PostgresInstanceStandard5A15059B": { + "Type": "AWS::RDS::DBInstance", + "Properties": { + "AllocatedStorage": "100", + "CopyTagsToSnapshot": true, + "DBInstanceClass": "db.r5.large", + "DBSubnetGroupName": { + "Ref": "PostgresInstanceStandardSubnetGroupAE72F91C" + }, + "DatabaseInsightsMode": "standard", + "EnablePerformanceInsights": true, + "Engine": "postgres", + "EngineVersion": "16.9", + "MasterUserPassword": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "PostgresInstanceStandardSecret9BC49B1C" + }, + ":SecretString:password::}}" + ] + ] + }, + "MasterUsername": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "PostgresInstanceStandardSecret9BC49B1C" + }, + ":SecretString:username::}}" + ] + ] + }, + "PerformanceInsightsRetentionPeriod": 7, + "StorageType": "gp2", + "VPCSecurityGroups": [ + { + "Fn::GetAtt": [ + "PostgresInstanceStandardSecurityGroupBF0F1D98", + "GroupId" + ] + } + ] + }, + "UpdateReplacePolicy": "Snapshot", + "DeletionPolicy": "Snapshot" + } + }, + "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-rds/test/integ.instance-database-insights.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-database-insights.js.snapshot/cdk.out new file mode 100644 index 0000000000000..b3a26d44a5f73 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-database-insights.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"44.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-database-insights.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-database-insights.js.snapshot/integ.json new file mode 100644 index 0000000000000..bde6bb7e52e21 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-database-insights.js.snapshot/integ.json @@ -0,0 +1,13 @@ +{ + "version": "44.0.0", + "testCases": { + "integ-instance-database-insights/DefaultTest": { + "stacks": [ + "aws-cdk-rds-integ-instance-database-insights" + ], + "assertionStack": "integ-instance-database-insights/DefaultTest/DeployAssert", + "assertionStackName": "integinstancedatabaseinsightsDefaultTestDeployAssertC69F68F1" + } + }, + "minimumCliVersion": "2.1019.2" +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-database-insights.js.snapshot/integinstancedatabaseinsightsDefaultTestDeployAssertC69F68F1.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-database-insights.js.snapshot/integinstancedatabaseinsightsDefaultTestDeployAssertC69F68F1.assets.json new file mode 100644 index 0000000000000..bc44fa53109e2 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-database-insights.js.snapshot/integinstancedatabaseinsightsDefaultTestDeployAssertC69F68F1.assets.json @@ -0,0 +1,20 @@ +{ + "version": "44.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "displayName": "integinstancedatabaseinsightsDefaultTestDeployAssertC69F68F1 Template", + "source": { + "path": "integinstancedatabaseinsightsDefaultTestDeployAssertC69F68F1.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-rds/test/integ.instance-database-insights.js.snapshot/integinstancedatabaseinsightsDefaultTestDeployAssertC69F68F1.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-database-insights.js.snapshot/integinstancedatabaseinsightsDefaultTestDeployAssertC69F68F1.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-database-insights.js.snapshot/integinstancedatabaseinsightsDefaultTestDeployAssertC69F68F1.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-rds/test/integ.instance-database-insights.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-database-insights.js.snapshot/manifest.json new file mode 100644 index 0000000000000..5a8cd2c88eb73 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-database-insights.js.snapshot/manifest.json @@ -0,0 +1,587 @@ +{ + "version": "44.0.0", + "artifacts": { + "aws-cdk-rds-integ-instance-database-insights.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-cdk-rds-integ-instance-database-insights.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-cdk-rds-integ-instance-database-insights": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-cdk-rds-integ-instance-database-insights.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}/b3df55b210167c31e441e7c0ea1b2ce00dee95c729733faf9078a16b7ce1f098.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-cdk-rds-integ-instance-database-insights.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-rds-integ-instance-database-insights.assets" + ], + "metadata": { + "/aws-cdk-rds-integ-instance-database-insights/VPC": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "maxAzs": "*", + "restrictDefaultSecurityGroup": false + } + } + ], + "/aws-cdk-rds-integ-instance-database-insights/VPC/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCB9E5F0B4" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet1": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "availabilityZone": "*", + "vpcId": "*", + "cidrBlock": "*", + "mapPublicIpOnLaunch": true, + "ipv6CidrBlock": "*", + "assignIpv6AddressOnCreation": "*" + } + }, + { + "type": "aws:cdk:analytics:construct", + "data": { + "availabilityZone": "*", + "vpcId": "*", + "cidrBlock": "*", + "mapPublicIpOnLaunch": true, + "ipv6CidrBlock": "*", + "assignIpv6AddressOnCreation": "*" + } + }, + { + "type": "aws:cdk:analytics:method", + "data": {} + }, + { + "type": "aws:cdk:analytics:method", + "data": { + "addNatGateway": [ + "*" + ] + } + } + ], + "/aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1SubnetB4246D30" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1RouteTableFEE4B781" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1RouteTableAssociation0B0896DC" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1DefaultRoute91CEF279" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet1/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1EIP6AD938E8" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet1/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1NATGatewayE0556630" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet2": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "availabilityZone": "*", + "vpcId": "*", + "cidrBlock": "*", + "mapPublicIpOnLaunch": true, + "ipv6CidrBlock": "*", + "assignIpv6AddressOnCreation": "*" + } + }, + { + "type": "aws:cdk:analytics:construct", + "data": { + "availabilityZone": "*", + "vpcId": "*", + "cidrBlock": "*", + "mapPublicIpOnLaunch": true, + "ipv6CidrBlock": "*", + "assignIpv6AddressOnCreation": "*" + } + }, + { + "type": "aws:cdk:analytics:method", + "data": {} + }, + { + "type": "aws:cdk:analytics:method", + "data": { + "addNatGateway": [ + "*" + ] + } + } + ], + "/aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2Subnet74179F39" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2RouteTable6F1A15F1" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2RouteTableAssociation5A808732" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2DefaultRouteB7481BBA" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet2/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2EIP4947BC00" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet2/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2NATGateway3C070193" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet1": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "availabilityZone": "*", + "vpcId": "*", + "cidrBlock": "*", + "mapPublicIpOnLaunch": false, + "ipv6CidrBlock": "*", + "assignIpv6AddressOnCreation": "*" + } + }, + { + "type": "aws:cdk:analytics:construct", + "data": { + "availabilityZone": "*", + "vpcId": "*", + "cidrBlock": "*", + "mapPublicIpOnLaunch": false, + "ipv6CidrBlock": "*", + "assignIpv6AddressOnCreation": "*" + } + }, + { + "type": "aws:cdk:analytics:method", + "data": {} + } + ], + "/aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1Subnet8BCA10E0" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1RouteTableBE8A6027" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1RouteTableAssociation347902D1" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1DefaultRouteAE1D6490" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet2": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "availabilityZone": "*", + "vpcId": "*", + "cidrBlock": "*", + "mapPublicIpOnLaunch": false, + "ipv6CidrBlock": "*", + "assignIpv6AddressOnCreation": "*" + } + }, + { + "type": "aws:cdk:analytics:construct", + "data": { + "availabilityZone": "*", + "vpcId": "*", + "cidrBlock": "*", + "mapPublicIpOnLaunch": false, + "ipv6CidrBlock": "*", + "assignIpv6AddressOnCreation": "*" + } + }, + { + "type": "aws:cdk:analytics:method", + "data": {} + } + ], + "/aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2RouteTable0A19E10E" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2RouteTableAssociation0C73D413" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2DefaultRouteF4F5CFD2" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/VPC/IGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCIGWB7E252D3" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/VPC/VPCGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCVPCGW99B986DC" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/PostgresInstanceAdvanced": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "engine": { + "engineType": "*", + "singleUserRotationApplication": "*", + "engineVersion": { + "fullVersion": "*", + "majorVersion": "*" + }, + "parameterGroupFamily": "*", + "engineFamily": "*", + "defaultUsername": "*" + }, + "instanceType": "*", + "vpc": "*", + "allocatedStorage": "*", + "performanceInsightRetention": 465 + } + } + ], + "/aws-cdk-rds-integ-instance-database-insights/PostgresInstanceAdvanced/SubnetGroup": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "description": "*", + "vpc": "*", + "vpcSubnets": "*", + "removalPolicy": "*" + } + } + ], + "/aws-cdk-rds-integ-instance-database-insights/PostgresInstanceAdvanced/SubnetGroup/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "PostgresInstanceAdvancedSubnetGroupB2B995B8" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/PostgresInstanceAdvanced/SecurityGroup": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "description": "*", + "vpc": "*" + } + } + ], + "/aws-cdk-rds-integ-instance-database-insights/PostgresInstanceAdvanced/SecurityGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PostgresInstanceAdvancedSecurityGroupF152AE03" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/PostgresInstanceAdvanced/Secret": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "encryptionKey": "*", + "secretName": "*", + "replicaRegions": "*" + } + }, + { + "type": "aws:cdk:analytics:construct", + "data": { + "username": "*", + "secretName": "*", + "encryptionKey": "*", + "excludeCharacters": "*", + "replaceOnPasswordCriteriaChanges": "*", + "replicaRegions": "*" + } + } + ], + "/aws-cdk-rds-integ-instance-database-insights/PostgresInstanceAdvanced/Secret/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PostgresInstanceAdvancedSecret375E0EBD" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/PostgresInstanceAdvanced/Secret/Attachment": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "secret": "*", + "target": "*" + } + } + ], + "/aws-cdk-rds-integ-instance-database-insights/PostgresInstanceAdvanced/Secret/Attachment/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PostgresInstanceAdvancedSecretAttachment90DDD610" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/PostgresInstanceAdvanced/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PostgresInstanceAdvanced78DE40A9" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/PostgresInstanceStandard": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "engine": { + "engineType": "*", + "singleUserRotationApplication": "*", + "engineVersion": { + "fullVersion": "*", + "majorVersion": "*" + }, + "parameterGroupFamily": "*", + "engineFamily": "*", + "defaultUsername": "*" + }, + "instanceType": "*", + "vpc": "*", + "allocatedStorage": "*", + "enablePerformanceInsights": true + } + } + ], + "/aws-cdk-rds-integ-instance-database-insights/PostgresInstanceStandard/SubnetGroup": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "description": "*", + "vpc": "*", + "vpcSubnets": "*", + "removalPolicy": "*" + } + } + ], + "/aws-cdk-rds-integ-instance-database-insights/PostgresInstanceStandard/SubnetGroup/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "PostgresInstanceStandardSubnetGroupAE72F91C" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/PostgresInstanceStandard/SecurityGroup": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "description": "*", + "vpc": "*" + } + } + ], + "/aws-cdk-rds-integ-instance-database-insights/PostgresInstanceStandard/SecurityGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PostgresInstanceStandardSecurityGroupBF0F1D98" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/PostgresInstanceStandard/Secret": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "encryptionKey": "*", + "secretName": "*", + "replicaRegions": "*" + } + }, + { + "type": "aws:cdk:analytics:construct", + "data": { + "username": "*", + "secretName": "*", + "encryptionKey": "*", + "excludeCharacters": "*", + "replaceOnPasswordCriteriaChanges": "*", + "replicaRegions": "*" + } + } + ], + "/aws-cdk-rds-integ-instance-database-insights/PostgresInstanceStandard/Secret/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PostgresInstanceStandardSecret9BC49B1C" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/PostgresInstanceStandard/Secret/Attachment": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "secret": "*", + "target": "*" + } + } + ], + "/aws-cdk-rds-integ-instance-database-insights/PostgresInstanceStandard/Secret/Attachment/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PostgresInstanceStandardSecretAttachment7B1E2D14" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/PostgresInstanceStandard/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PostgresInstanceStandard5A15059B" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-cdk-rds-integ-instance-database-insights/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-cdk-rds-integ-instance-database-insights" + }, + "integinstancedatabaseinsightsDefaultTestDeployAssertC69F68F1.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "integinstancedatabaseinsightsDefaultTestDeployAssertC69F68F1.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "integinstancedatabaseinsightsDefaultTestDeployAssertC69F68F1": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "integinstancedatabaseinsightsDefaultTestDeployAssertC69F68F1.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": [ + "integinstancedatabaseinsightsDefaultTestDeployAssertC69F68F1.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": [ + "integinstancedatabaseinsightsDefaultTestDeployAssertC69F68F1.assets" + ], + "metadata": { + "/integ-instance-database-insights/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/integ-instance-database-insights/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "integ-instance-database-insights/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + }, + "minimumCliVersion": "2.1019.2" +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-database-insights.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-database-insights.js.snapshot/tree.json new file mode 100644 index 0000000000000..947dc16245251 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-database-insights.js.snapshot/tree.json @@ -0,0 +1 @@ +{"version":"tree-0.1","tree":{"id":"App","path":"","constructInfo":{"fqn":"aws-cdk-lib.App","version":"0.0.0"},"children":{"aws-cdk-rds-integ-instance-database-insights":{"id":"aws-cdk-rds-integ-instance-database-insights","path":"aws-cdk-rds-integ-instance-database-insights","constructInfo":{"fqn":"aws-cdk-lib.Stack","version":"0.0.0"},"children":{"VPC":{"id":"VPC","path":"aws-cdk-rds-integ-instance-database-insights/VPC","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.Vpc","version":"0.0.0","metadata":[{"maxAzs":"*","restrictDefaultSecurityGroup":false}]},"children":{"Resource":{"id":"Resource","path":"aws-cdk-rds-integ-instance-database-insights/VPC/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnVPC","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::VPC","aws:cdk:cloudformation:props":{"cidrBlock":"10.0.0.0/16","enableDnsHostnames":true,"enableDnsSupport":true,"instanceTenancy":"default","tags":[{"key":"Name","value":"aws-cdk-rds-integ-instance-database-insights/VPC"}]}}},"PublicSubnet1":{"id":"PublicSubnet1","path":"aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet1","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.PublicSubnet","version":"0.0.0","metadata":[{"availabilityZone":"*","vpcId":"*","cidrBlock":"*","mapPublicIpOnLaunch":true,"ipv6CidrBlock":"*","assignIpv6AddressOnCreation":"*"},{"availabilityZone":"*","vpcId":"*","cidrBlock":"*","mapPublicIpOnLaunch":true,"ipv6CidrBlock":"*","assignIpv6AddressOnCreation":"*"},{},{"addNatGateway":["*"]}]},"children":{"Subnet":{"id":"Subnet","path":"aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet1/Subnet","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSubnet","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::Subnet","aws:cdk:cloudformation:props":{"availabilityZone":{"Fn::Select":[0,{"Fn::GetAZs":""}]},"cidrBlock":"10.0.0.0/18","mapPublicIpOnLaunch":true,"tags":[{"key":"aws-cdk:subnet-name","value":"Public"},{"key":"aws-cdk:subnet-type","value":"Public"},{"key":"Name","value":"aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet1"}],"vpcId":{"Ref":"VPCB9E5F0B4"}}}},"Acl":{"id":"Acl","path":"aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet1/Acl","constructInfo":{"fqn":"aws-cdk-lib.Resource","version":"0.0.0","metadata":[]}},"RouteTable":{"id":"RouteTable","path":"aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet1/RouteTable","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnRouteTable","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::RouteTable","aws:cdk:cloudformation:props":{"tags":[{"key":"Name","value":"aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet1"}],"vpcId":{"Ref":"VPCB9E5F0B4"}}}},"RouteTableAssociation":{"id":"RouteTableAssociation","path":"aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet1/RouteTableAssociation","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::SubnetRouteTableAssociation","aws:cdk:cloudformation:props":{"routeTableId":{"Ref":"VPCPublicSubnet1RouteTableFEE4B781"},"subnetId":{"Ref":"VPCPublicSubnet1SubnetB4246D30"}}}},"DefaultRoute":{"id":"DefaultRoute","path":"aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet1/DefaultRoute","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnRoute","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::Route","aws:cdk:cloudformation:props":{"destinationCidrBlock":"0.0.0.0/0","gatewayId":{"Ref":"VPCIGWB7E252D3"},"routeTableId":{"Ref":"VPCPublicSubnet1RouteTableFEE4B781"}}}},"EIP":{"id":"EIP","path":"aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet1/EIP","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnEIP","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::EIP","aws:cdk:cloudformation:props":{"domain":"vpc","tags":[{"key":"Name","value":"aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet1"}]}}},"NATGateway":{"id":"NATGateway","path":"aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet1/NATGateway","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnNatGateway","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::NatGateway","aws:cdk:cloudformation:props":{"allocationId":{"Fn::GetAtt":["VPCPublicSubnet1EIP6AD938E8","AllocationId"]},"subnetId":{"Ref":"VPCPublicSubnet1SubnetB4246D30"},"tags":[{"key":"Name","value":"aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet1"}]}}}}},"PublicSubnet2":{"id":"PublicSubnet2","path":"aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet2","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.PublicSubnet","version":"0.0.0","metadata":[{"availabilityZone":"*","vpcId":"*","cidrBlock":"*","mapPublicIpOnLaunch":true,"ipv6CidrBlock":"*","assignIpv6AddressOnCreation":"*"},{"availabilityZone":"*","vpcId":"*","cidrBlock":"*","mapPublicIpOnLaunch":true,"ipv6CidrBlock":"*","assignIpv6AddressOnCreation":"*"},{},{"addNatGateway":["*"]}]},"children":{"Subnet":{"id":"Subnet","path":"aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet2/Subnet","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSubnet","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::Subnet","aws:cdk:cloudformation:props":{"availabilityZone":{"Fn::Select":[1,{"Fn::GetAZs":""}]},"cidrBlock":"10.0.64.0/18","mapPublicIpOnLaunch":true,"tags":[{"key":"aws-cdk:subnet-name","value":"Public"},{"key":"aws-cdk:subnet-type","value":"Public"},{"key":"Name","value":"aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet2"}],"vpcId":{"Ref":"VPCB9E5F0B4"}}}},"Acl":{"id":"Acl","path":"aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet2/Acl","constructInfo":{"fqn":"aws-cdk-lib.Resource","version":"0.0.0","metadata":[]}},"RouteTable":{"id":"RouteTable","path":"aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet2/RouteTable","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnRouteTable","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::RouteTable","aws:cdk:cloudformation:props":{"tags":[{"key":"Name","value":"aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet2"}],"vpcId":{"Ref":"VPCB9E5F0B4"}}}},"RouteTableAssociation":{"id":"RouteTableAssociation","path":"aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet2/RouteTableAssociation","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::SubnetRouteTableAssociation","aws:cdk:cloudformation:props":{"routeTableId":{"Ref":"VPCPublicSubnet2RouteTable6F1A15F1"},"subnetId":{"Ref":"VPCPublicSubnet2Subnet74179F39"}}}},"DefaultRoute":{"id":"DefaultRoute","path":"aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet2/DefaultRoute","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnRoute","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::Route","aws:cdk:cloudformation:props":{"destinationCidrBlock":"0.0.0.0/0","gatewayId":{"Ref":"VPCIGWB7E252D3"},"routeTableId":{"Ref":"VPCPublicSubnet2RouteTable6F1A15F1"}}}},"EIP":{"id":"EIP","path":"aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet2/EIP","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnEIP","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::EIP","aws:cdk:cloudformation:props":{"domain":"vpc","tags":[{"key":"Name","value":"aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet2"}]}}},"NATGateway":{"id":"NATGateway","path":"aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet2/NATGateway","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnNatGateway","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::NatGateway","aws:cdk:cloudformation:props":{"allocationId":{"Fn::GetAtt":["VPCPublicSubnet2EIP4947BC00","AllocationId"]},"subnetId":{"Ref":"VPCPublicSubnet2Subnet74179F39"},"tags":[{"key":"Name","value":"aws-cdk-rds-integ-instance-database-insights/VPC/PublicSubnet2"}]}}}}},"PrivateSubnet1":{"id":"PrivateSubnet1","path":"aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet1","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.PrivateSubnet","version":"0.0.0","metadata":[{"availabilityZone":"*","vpcId":"*","cidrBlock":"*","mapPublicIpOnLaunch":false,"ipv6CidrBlock":"*","assignIpv6AddressOnCreation":"*"},{"availabilityZone":"*","vpcId":"*","cidrBlock":"*","mapPublicIpOnLaunch":false,"ipv6CidrBlock":"*","assignIpv6AddressOnCreation":"*"},{}]},"children":{"Subnet":{"id":"Subnet","path":"aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet1/Subnet","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSubnet","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::Subnet","aws:cdk:cloudformation:props":{"availabilityZone":{"Fn::Select":[0,{"Fn::GetAZs":""}]},"cidrBlock":"10.0.128.0/18","mapPublicIpOnLaunch":false,"tags":[{"key":"aws-cdk:subnet-name","value":"Private"},{"key":"aws-cdk:subnet-type","value":"Private"},{"key":"Name","value":"aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet1"}],"vpcId":{"Ref":"VPCB9E5F0B4"}}}},"Acl":{"id":"Acl","path":"aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet1/Acl","constructInfo":{"fqn":"aws-cdk-lib.Resource","version":"0.0.0","metadata":[]}},"RouteTable":{"id":"RouteTable","path":"aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet1/RouteTable","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnRouteTable","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::RouteTable","aws:cdk:cloudformation:props":{"tags":[{"key":"Name","value":"aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet1"}],"vpcId":{"Ref":"VPCB9E5F0B4"}}}},"RouteTableAssociation":{"id":"RouteTableAssociation","path":"aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet1/RouteTableAssociation","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::SubnetRouteTableAssociation","aws:cdk:cloudformation:props":{"routeTableId":{"Ref":"VPCPrivateSubnet1RouteTableBE8A6027"},"subnetId":{"Ref":"VPCPrivateSubnet1Subnet8BCA10E0"}}}},"DefaultRoute":{"id":"DefaultRoute","path":"aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet1/DefaultRoute","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnRoute","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::Route","aws:cdk:cloudformation:props":{"destinationCidrBlock":"0.0.0.0/0","natGatewayId":{"Ref":"VPCPublicSubnet1NATGatewayE0556630"},"routeTableId":{"Ref":"VPCPrivateSubnet1RouteTableBE8A6027"}}}}}},"PrivateSubnet2":{"id":"PrivateSubnet2","path":"aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet2","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.PrivateSubnet","version":"0.0.0","metadata":[{"availabilityZone":"*","vpcId":"*","cidrBlock":"*","mapPublicIpOnLaunch":false,"ipv6CidrBlock":"*","assignIpv6AddressOnCreation":"*"},{"availabilityZone":"*","vpcId":"*","cidrBlock":"*","mapPublicIpOnLaunch":false,"ipv6CidrBlock":"*","assignIpv6AddressOnCreation":"*"},{}]},"children":{"Subnet":{"id":"Subnet","path":"aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet2/Subnet","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSubnet","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::Subnet","aws:cdk:cloudformation:props":{"availabilityZone":{"Fn::Select":[1,{"Fn::GetAZs":""}]},"cidrBlock":"10.0.192.0/18","mapPublicIpOnLaunch":false,"tags":[{"key":"aws-cdk:subnet-name","value":"Private"},{"key":"aws-cdk:subnet-type","value":"Private"},{"key":"Name","value":"aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet2"}],"vpcId":{"Ref":"VPCB9E5F0B4"}}}},"Acl":{"id":"Acl","path":"aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet2/Acl","constructInfo":{"fqn":"aws-cdk-lib.Resource","version":"0.0.0","metadata":[]}},"RouteTable":{"id":"RouteTable","path":"aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet2/RouteTable","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnRouteTable","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::RouteTable","aws:cdk:cloudformation:props":{"tags":[{"key":"Name","value":"aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet2"}],"vpcId":{"Ref":"VPCB9E5F0B4"}}}},"RouteTableAssociation":{"id":"RouteTableAssociation","path":"aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet2/RouteTableAssociation","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::SubnetRouteTableAssociation","aws:cdk:cloudformation:props":{"routeTableId":{"Ref":"VPCPrivateSubnet2RouteTable0A19E10E"},"subnetId":{"Ref":"VPCPrivateSubnet2SubnetCFCDAA7A"}}}},"DefaultRoute":{"id":"DefaultRoute","path":"aws-cdk-rds-integ-instance-database-insights/VPC/PrivateSubnet2/DefaultRoute","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnRoute","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::Route","aws:cdk:cloudformation:props":{"destinationCidrBlock":"0.0.0.0/0","natGatewayId":{"Ref":"VPCPublicSubnet2NATGateway3C070193"},"routeTableId":{"Ref":"VPCPrivateSubnet2RouteTable0A19E10E"}}}}}},"IGW":{"id":"IGW","path":"aws-cdk-rds-integ-instance-database-insights/VPC/IGW","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnInternetGateway","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::InternetGateway","aws:cdk:cloudformation:props":{"tags":[{"key":"Name","value":"aws-cdk-rds-integ-instance-database-insights/VPC"}]}}},"VPCGW":{"id":"VPCGW","path":"aws-cdk-rds-integ-instance-database-insights/VPC/VPCGW","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::VPCGatewayAttachment","aws:cdk:cloudformation:props":{"internetGatewayId":{"Ref":"VPCIGWB7E252D3"},"vpcId":{"Ref":"VPCB9E5F0B4"}}}}}},"PostgresInstanceAdvanced":{"id":"PostgresInstanceAdvanced","path":"aws-cdk-rds-integ-instance-database-insights/PostgresInstanceAdvanced","constructInfo":{"fqn":"aws-cdk-lib.aws_rds.DatabaseInstance","version":"0.0.0","metadata":[{"engine":{"engineType":"*","singleUserRotationApplication":"*","engineVersion":{"fullVersion":"*","majorVersion":"*"},"parameterGroupFamily":"*","engineFamily":"*","defaultUsername":"*"},"instanceType":"*","vpc":"*","allocatedStorage":"*","performanceInsightRetention":465}]},"children":{"SubnetGroup":{"id":"SubnetGroup","path":"aws-cdk-rds-integ-instance-database-insights/PostgresInstanceAdvanced/SubnetGroup","constructInfo":{"fqn":"aws-cdk-lib.aws_rds.SubnetGroup","version":"0.0.0","metadata":[{"description":"*","vpc":"*","vpcSubnets":"*","removalPolicy":"*"}]},"children":{"Default":{"id":"Default","path":"aws-cdk-rds-integ-instance-database-insights/PostgresInstanceAdvanced/SubnetGroup/Default","constructInfo":{"fqn":"aws-cdk-lib.aws_rds.CfnDBSubnetGroup","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::RDS::DBSubnetGroup","aws:cdk:cloudformation:props":{"dbSubnetGroupDescription":"Subnet group for PostgresInstanceAdvanced database","subnetIds":[{"Ref":"VPCPrivateSubnet1Subnet8BCA10E0"},{"Ref":"VPCPrivateSubnet2SubnetCFCDAA7A"}]}}}}},"SecurityGroup":{"id":"SecurityGroup","path":"aws-cdk-rds-integ-instance-database-insights/PostgresInstanceAdvanced/SecurityGroup","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.SecurityGroup","version":"0.0.0","metadata":[{"description":"*","vpc":"*"}]},"children":{"Resource":{"id":"Resource","path":"aws-cdk-rds-integ-instance-database-insights/PostgresInstanceAdvanced/SecurityGroup/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSecurityGroup","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::SecurityGroup","aws:cdk:cloudformation:props":{"groupDescription":"Security group for PostgresInstanceAdvanced database","securityGroupEgress":[{"cidrIp":"0.0.0.0/0","description":"Allow all outbound traffic by default","ipProtocol":"-1"}],"vpcId":{"Ref":"VPCB9E5F0B4"}}}}}},"Secret":{"id":"Secret","path":"aws-cdk-rds-integ-instance-database-insights/PostgresInstanceAdvanced/Secret","constructInfo":{"fqn":"aws-cdk-lib.aws_rds.DatabaseSecret","version":"0.0.0","metadata":[{"encryptionKey":"*","secretName":"*","replicaRegions":"*"},{"username":"*","secretName":"*","encryptionKey":"*","excludeCharacters":"*","replaceOnPasswordCriteriaChanges":"*","replicaRegions":"*"}]},"children":{"Resource":{"id":"Resource","path":"aws-cdk-rds-integ-instance-database-insights/PostgresInstanceAdvanced/Secret/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_secretsmanager.CfnSecret","version":"0.0.0"},"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":30,"secretStringTemplate":"{\"username\":\"postgres\"}","generateStringKey":"password","excludeCharacters":" %+~`#$&*()|[]{}:;<>?!'/@\"\\"}}}},"Attachment":{"id":"Attachment","path":"aws-cdk-rds-integ-instance-database-insights/PostgresInstanceAdvanced/Secret/Attachment","constructInfo":{"fqn":"aws-cdk-lib.aws_secretsmanager.SecretTargetAttachment","version":"0.0.0","metadata":[{"secret":"*","target":"*"}]},"children":{"Resource":{"id":"Resource","path":"aws-cdk-rds-integ-instance-database-insights/PostgresInstanceAdvanced/Secret/Attachment/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_secretsmanager.CfnSecretTargetAttachment","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::SecretsManager::SecretTargetAttachment","aws:cdk:cloudformation:props":{"secretId":{"Ref":"PostgresInstanceAdvancedSecret375E0EBD"},"targetId":{"Ref":"PostgresInstanceAdvanced78DE40A9"},"targetType":"AWS::RDS::DBInstance"}}}}}}},"Resource":{"id":"Resource","path":"aws-cdk-rds-integ-instance-database-insights/PostgresInstanceAdvanced/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_rds.CfnDBInstance","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::RDS::DBInstance","aws:cdk:cloudformation:props":{"allocatedStorage":"100","copyTagsToSnapshot":true,"databaseInsightsMode":"advanced","dbInstanceClass":"db.r5.large","dbSubnetGroupName":{"Ref":"PostgresInstanceAdvancedSubnetGroupB2B995B8"},"enablePerformanceInsights":true,"engine":"postgres","engineVersion":"16.9","masterUsername":{"Fn::Join":["",["{{resolve:secretsmanager:",{"Ref":"PostgresInstanceAdvancedSecret375E0EBD"},":SecretString:username::}}"]]},"masterUserPassword":{"Fn::Join":["",["{{resolve:secretsmanager:",{"Ref":"PostgresInstanceAdvancedSecret375E0EBD"},":SecretString:password::}}"]]},"performanceInsightsRetentionPeriod":465,"storageType":"gp2","vpcSecurityGroups":[{"Fn::GetAtt":["PostgresInstanceAdvancedSecurityGroupF152AE03","GroupId"]}]}}}}},"PostgresInstanceStandard":{"id":"PostgresInstanceStandard","path":"aws-cdk-rds-integ-instance-database-insights/PostgresInstanceStandard","constructInfo":{"fqn":"aws-cdk-lib.aws_rds.DatabaseInstance","version":"0.0.0","metadata":[{"engine":{"engineType":"*","singleUserRotationApplication":"*","engineVersion":{"fullVersion":"*","majorVersion":"*"},"parameterGroupFamily":"*","engineFamily":"*","defaultUsername":"*"},"instanceType":"*","vpc":"*","allocatedStorage":"*","enablePerformanceInsights":true}]},"children":{"SubnetGroup":{"id":"SubnetGroup","path":"aws-cdk-rds-integ-instance-database-insights/PostgresInstanceStandard/SubnetGroup","constructInfo":{"fqn":"aws-cdk-lib.aws_rds.SubnetGroup","version":"0.0.0","metadata":[{"description":"*","vpc":"*","vpcSubnets":"*","removalPolicy":"*"}]},"children":{"Default":{"id":"Default","path":"aws-cdk-rds-integ-instance-database-insights/PostgresInstanceStandard/SubnetGroup/Default","constructInfo":{"fqn":"aws-cdk-lib.aws_rds.CfnDBSubnetGroup","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::RDS::DBSubnetGroup","aws:cdk:cloudformation:props":{"dbSubnetGroupDescription":"Subnet group for PostgresInstanceStandard database","subnetIds":[{"Ref":"VPCPrivateSubnet1Subnet8BCA10E0"},{"Ref":"VPCPrivateSubnet2SubnetCFCDAA7A"}]}}}}},"SecurityGroup":{"id":"SecurityGroup","path":"aws-cdk-rds-integ-instance-database-insights/PostgresInstanceStandard/SecurityGroup","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.SecurityGroup","version":"0.0.0","metadata":[{"description":"*","vpc":"*"}]},"children":{"Resource":{"id":"Resource","path":"aws-cdk-rds-integ-instance-database-insights/PostgresInstanceStandard/SecurityGroup/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSecurityGroup","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::SecurityGroup","aws:cdk:cloudformation:props":{"groupDescription":"Security group for PostgresInstanceStandard database","securityGroupEgress":[{"cidrIp":"0.0.0.0/0","description":"Allow all outbound traffic by default","ipProtocol":"-1"}],"vpcId":{"Ref":"VPCB9E5F0B4"}}}}}},"Secret":{"id":"Secret","path":"aws-cdk-rds-integ-instance-database-insights/PostgresInstanceStandard/Secret","constructInfo":{"fqn":"aws-cdk-lib.aws_rds.DatabaseSecret","version":"0.0.0","metadata":[{"encryptionKey":"*","secretName":"*","replicaRegions":"*"},{"username":"*","secretName":"*","encryptionKey":"*","excludeCharacters":"*","replaceOnPasswordCriteriaChanges":"*","replicaRegions":"*"}]},"children":{"Resource":{"id":"Resource","path":"aws-cdk-rds-integ-instance-database-insights/PostgresInstanceStandard/Secret/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_secretsmanager.CfnSecret","version":"0.0.0"},"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":30,"secretStringTemplate":"{\"username\":\"postgres\"}","generateStringKey":"password","excludeCharacters":" %+~`#$&*()|[]{}:;<>?!'/@\"\\"}}}},"Attachment":{"id":"Attachment","path":"aws-cdk-rds-integ-instance-database-insights/PostgresInstanceStandard/Secret/Attachment","constructInfo":{"fqn":"aws-cdk-lib.aws_secretsmanager.SecretTargetAttachment","version":"0.0.0","metadata":[{"secret":"*","target":"*"}]},"children":{"Resource":{"id":"Resource","path":"aws-cdk-rds-integ-instance-database-insights/PostgresInstanceStandard/Secret/Attachment/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_secretsmanager.CfnSecretTargetAttachment","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::SecretsManager::SecretTargetAttachment","aws:cdk:cloudformation:props":{"secretId":{"Ref":"PostgresInstanceStandardSecret9BC49B1C"},"targetId":{"Ref":"PostgresInstanceStandard5A15059B"},"targetType":"AWS::RDS::DBInstance"}}}}}}},"Resource":{"id":"Resource","path":"aws-cdk-rds-integ-instance-database-insights/PostgresInstanceStandard/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_rds.CfnDBInstance","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::RDS::DBInstance","aws:cdk:cloudformation:props":{"allocatedStorage":"100","copyTagsToSnapshot":true,"databaseInsightsMode":"standard","dbInstanceClass":"db.r5.large","dbSubnetGroupName":{"Ref":"PostgresInstanceStandardSubnetGroupAE72F91C"},"enablePerformanceInsights":true,"engine":"postgres","engineVersion":"16.9","masterUsername":{"Fn::Join":["",["{{resolve:secretsmanager:",{"Ref":"PostgresInstanceStandardSecret9BC49B1C"},":SecretString:username::}}"]]},"masterUserPassword":{"Fn::Join":["",["{{resolve:secretsmanager:",{"Ref":"PostgresInstanceStandardSecret9BC49B1C"},":SecretString:password::}}"]]},"performanceInsightsRetentionPeriod":7,"storageType":"gp2","vpcSecurityGroups":[{"Fn::GetAtt":["PostgresInstanceStandardSecurityGroupBF0F1D98","GroupId"]}]}}}}},"BootstrapVersion":{"id":"BootstrapVersion","path":"aws-cdk-rds-integ-instance-database-insights/BootstrapVersion","constructInfo":{"fqn":"aws-cdk-lib.CfnParameter","version":"0.0.0"}},"CheckBootstrapVersion":{"id":"CheckBootstrapVersion","path":"aws-cdk-rds-integ-instance-database-insights/CheckBootstrapVersion","constructInfo":{"fqn":"aws-cdk-lib.CfnRule","version":"0.0.0"}}}},"integ-instance-database-insights":{"id":"integ-instance-database-insights","path":"integ-instance-database-insights","constructInfo":{"fqn":"@aws-cdk/integ-tests-alpha.IntegTest","version":"0.0.0"},"children":{"DefaultTest":{"id":"DefaultTest","path":"integ-instance-database-insights/DefaultTest","constructInfo":{"fqn":"@aws-cdk/integ-tests-alpha.IntegTestCase","version":"0.0.0"},"children":{"Default":{"id":"Default","path":"integ-instance-database-insights/DefaultTest/Default","constructInfo":{"fqn":"constructs.Construct","version":"10.4.2"}},"DeployAssert":{"id":"DeployAssert","path":"integ-instance-database-insights/DefaultTest/DeployAssert","constructInfo":{"fqn":"aws-cdk-lib.Stack","version":"0.0.0"},"children":{"BootstrapVersion":{"id":"BootstrapVersion","path":"integ-instance-database-insights/DefaultTest/DeployAssert/BootstrapVersion","constructInfo":{"fqn":"aws-cdk-lib.CfnParameter","version":"0.0.0"}},"CheckBootstrapVersion":{"id":"CheckBootstrapVersion","path":"integ-instance-database-insights/DefaultTest/DeployAssert/CheckBootstrapVersion","constructInfo":{"fqn":"aws-cdk-lib.CfnRule","version":"0.0.0"}}}}}}}},"Tree":{"id":"Tree","path":"Tree","constructInfo":{"fqn":"constructs.Construct","version":"10.4.2"}}}}} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-database-insights.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-database-insights.ts new file mode 100644 index 0000000000000..41240095846f7 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.instance-database-insights.ts @@ -0,0 +1,43 @@ +import * as ec2 from 'aws-cdk-lib/aws-ec2'; +import * as cdk from 'aws-cdk-lib'; +import { + DatabaseInstance, + DatabaseInsightsMode, + PerformanceInsightRetention, + PostgresEngineVersion, + DatabaseInstanceEngine, +} from 'aws-cdk-lib/aws-rds'; +import { IntegTest } from '@aws-cdk/integ-tests-alpha'; + +class TestStack extends cdk.Stack { + constructor(scope: cdk.App, id: string, props?: cdk.StackProps) { + super(scope, id, props); + + const vpc = new ec2.Vpc(this, 'VPC', { maxAzs: 2, restrictDefaultSecurityGroup: false }); + + new DatabaseInstance(this, 'PostgresInstanceAdvanced', { + engine: DatabaseInstanceEngine.postgres({ version: PostgresEngineVersion.VER_16_9 }), + instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.LARGE), + vpc, + allocatedStorage: 100, + databaseInsightsMode: DatabaseInsightsMode.ADVANCED, + performanceInsightRetention: PerformanceInsightRetention.MONTHS_15, + }); + + new DatabaseInstance(this, 'PostgresInstanceStandard', { + engine: DatabaseInstanceEngine.postgres({ version: PostgresEngineVersion.VER_16_9 }), + instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.LARGE), + vpc, + allocatedStorage: 100, + databaseInsightsMode: DatabaseInsightsMode.STANDARD, + enablePerformanceInsights: true, + }); + } +} + +const app = new cdk.App(); +const stack = new TestStack(app, 'aws-cdk-rds-integ-instance-database-insights'); + +new IntegTest(app, 'integ-instance-database-insights', { + testCases: [stack], +}); diff --git a/packages/aws-cdk-lib/aws-rds/README.md b/packages/aws-cdk-lib/aws-rds/README.md index 9eb737e7c638d..43e4962f8becc 100644 --- a/packages/aws-cdk-lib/aws-rds/README.md +++ b/packages/aws-cdk-lib/aws-rds/README.md @@ -1514,7 +1514,20 @@ new rds.DatabaseCluster(this, 'Database', { }); ``` -Note: Database Insights are only supported for Amazon Aurora MySQL and Amazon Aurora PostgreSQL clusters. +Database Insights is also supported for RDS instances: + +```ts +declare const vpc: ec2.Vpc; +new rds.DatabaseInstance(this, 'PostgresInstance', { + engine: rds.DatabaseInstanceEngine.postgres({ version: rds.PostgresEngineVersion.VER_17_5 }), + instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.LARGE), + vpc, + // If you enable the advanced mode of Database Insights, + // Performance Insights is enabled and you must set the `performanceInsightRetention` to 465(15 months). + databaseInsightsMode: rds.DatabaseInsightsMode.ADVANCED, + performanceInsightRetention: rds.PerformanceInsightRetention.MONTHS_15, +}); +``` > Visit [CloudWatch Database Insights](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Database-Insights.html) for more details. diff --git a/packages/aws-cdk-lib/aws-rds/lib/cluster.ts b/packages/aws-cdk-lib/aws-rds/lib/cluster.ts index 4fe6a1f9c3d09..d95c689613225 100644 --- a/packages/aws-cdk-lib/aws-rds/lib/cluster.ts +++ b/packages/aws-cdk-lib/aws-rds/lib/cluster.ts @@ -2,6 +2,7 @@ import { Construct } from 'constructs'; import { IAuroraClusterInstance, IClusterInstance, InstanceType } from './aurora-cluster-instance'; import { ClusterEngineConfig, IClusterEngine } from './cluster-engine'; import { DatabaseClusterAttributes, IDatabaseCluster } from './cluster-ref'; +import { DatabaseInsightsMode } from './database-insights-mode'; import { Endpoint } from './endpoint'; import { NetworkType } from './instance'; import { IParameterGroup, ParameterGroup } from './parameter-group'; @@ -11,7 +12,7 @@ import { BackupProps, Credentials, InstanceProps, PerformanceInsightRetention, R import { DatabaseProxy, DatabaseProxyOptions, ProxyTarget } from './proxy'; import { CfnDBCluster, CfnDBClusterProps, CfnDBInstance } from './rds.generated'; import { ISubnetGroup, SubnetGroup } from './subnet-group'; -import { validateDatabaseClusterProps } from './validate-database-cluster-props'; +import { validateDatabaseClusterProps } from './validate-database-insights'; import * as cloudwatch from '../../aws-cloudwatch'; import * as ec2 from '../../aws-ec2'; import * as iam from '../../aws-iam'; @@ -572,21 +573,6 @@ export enum ClusterScailabilityType { LIMITLESS = 'limitless', } -/** - * The database insights mode of the Aurora DB cluster. - */ -export enum DatabaseInsightsMode { - /** - * Standard mode. - */ - STANDARD = 'standard', - - /** - * Advanced mode. - */ - ADVANCED = 'advanced', -} - /** * Properties for looking up an existing DatabaseCluster. */ diff --git a/packages/aws-cdk-lib/aws-rds/lib/database-insights-mode.ts b/packages/aws-cdk-lib/aws-rds/lib/database-insights-mode.ts new file mode 100644 index 0000000000000..3de4cab00e948 --- /dev/null +++ b/packages/aws-cdk-lib/aws-rds/lib/database-insights-mode.ts @@ -0,0 +1,14 @@ +/** + * The database insights mode. + */ +export enum DatabaseInsightsMode { + /** + * Standard mode. + */ + STANDARD = 'standard', + + /** + * Advanced mode. + */ + ADVANCED = 'advanced', +} diff --git a/packages/aws-cdk-lib/aws-rds/lib/index.ts b/packages/aws-cdk-lib/aws-rds/lib/index.ts index 619251587537d..70d5fd1ea9586 100644 --- a/packages/aws-cdk-lib/aws-rds/lib/index.ts +++ b/packages/aws-cdk-lib/aws-rds/lib/index.ts @@ -1,6 +1,7 @@ export * from './engine'; export * from './engine-version'; export * from './ca-certificate'; +export * from './database-insights-mode'; export * from './cluster'; export * from './cluster-ref'; export * from './cluster-engine'; diff --git a/packages/aws-cdk-lib/aws-rds/lib/instance.ts b/packages/aws-cdk-lib/aws-rds/lib/instance.ts index a2c5c95e3a070..d76e9ea8b6c19 100644 --- a/packages/aws-cdk-lib/aws-rds/lib/instance.ts +++ b/packages/aws-cdk-lib/aws-rds/lib/instance.ts @@ -1,5 +1,6 @@ import { Construct } from 'constructs'; import { CaCertificate } from './ca-certificate'; +import { DatabaseInsightsMode } from './database-insights-mode'; import { DatabaseSecret } from './database-secret'; import { Endpoint } from './endpoint'; import { IInstanceEngine } from './instance-engine'; @@ -10,6 +11,7 @@ import { Credentials, EngineLifecycleSupport, PerformanceInsightRetention, Rotat import { DatabaseProxy, DatabaseProxyOptions, ProxyTarget } from './proxy'; import { CfnDBInstance, CfnDBInstanceProps } from './rds.generated'; import { ISubnetGroup, SubnetGroup } from './subnet-group'; +import { validateDatabaseInstanceProps } from './validate-database-insights'; import * as ec2 from '../../aws-ec2'; import * as events from '../../aws-events'; import * as iam from '../../aws-iam'; @@ -604,6 +606,8 @@ export interface DatabaseInstanceNewProps { /** * The amount of time, in days, to retain Performance Insights data. * + * If you set `databaseInsightsMode` to `DatabaseInsightsMode.ADVANCED`, you must set this property to `PerformanceInsightRetention.MONTHS_15`. + * * @default 7 this is the free tier */ readonly performanceInsightRetention?: PerformanceInsightRetention; @@ -615,6 +619,13 @@ export interface DatabaseInstanceNewProps { */ readonly performanceInsightEncryptionKey?: kms.IKey; + /** + * The database insights mode. + * + * @default - DatabaseInsightsMode.STANDARD when performance insights are enabled, otherwise not set. + */ + readonly databaseInsightsMode?: DatabaseInsightsMode; + /** * The list of log types that need to be enabled for exporting to * CloudWatch Logs. @@ -917,10 +928,9 @@ abstract class DatabaseInstanceNew extends DatabaseInstanceBase implements IData this.enableIamAuthentication = props.iamAuthentication; const enablePerformanceInsights = props.enablePerformanceInsights - || props.performanceInsightRetention !== undefined || props.performanceInsightEncryptionKey !== undefined; - if (enablePerformanceInsights && props.enablePerformanceInsights === false) { - throw new ValidationError('`enablePerformanceInsights` disabled, but `performanceInsightRetention` or `performanceInsightEncryptionKey` was set', this); - } + || props.performanceInsightRetention !== undefined + || props.performanceInsightEncryptionKey !== undefined + || props.databaseInsightsMode === DatabaseInsightsMode.ADVANCED; if (props.domain) { this.domainId = props.domain; @@ -971,6 +981,7 @@ abstract class DatabaseInstanceNew extends DatabaseInstanceBase implements IData performanceInsightsRetentionPeriod: enablePerformanceInsights ? (props.performanceInsightRetention || PerformanceInsightRetention.DEFAULT) : undefined, + databaseInsightsMode: props.databaseInsightsMode, port: props.port !== undefined ? Tokenization.stringifyNumber(props.port) : undefined, preferredBackupWindow: props.preferredBackupWindow, preferredMaintenanceWindow: props.preferredMaintenanceWindow, @@ -1282,6 +1293,9 @@ export class DatabaseInstance extends DatabaseInstanceSource implements IDatabas // Enhanced CDK Analytics Telemetry addConstructMetadata(this, props); + // Validate database instance props + validateDatabaseInstanceProps(this, props); + const credentials = renderCredentials(this, props.engine, props.credentials); const secret = credentials.secret; diff --git a/packages/aws-cdk-lib/aws-rds/lib/validate-database-cluster-props.ts b/packages/aws-cdk-lib/aws-rds/lib/validate-database-insights.ts similarity index 76% rename from packages/aws-cdk-lib/aws-rds/lib/validate-database-cluster-props.ts rename to packages/aws-cdk-lib/aws-rds/lib/validate-database-insights.ts index cd2ff29c59e7c..84ccb47a430f6 100644 --- a/packages/aws-cdk-lib/aws-rds/lib/validate-database-cluster-props.ts +++ b/packages/aws-cdk-lib/aws-rds/lib/validate-database-insights.ts @@ -1,9 +1,14 @@ import { Construct } from 'constructs'; -import { ClusterScailabilityType, DatabaseCluster, DatabaseClusterProps, DBClusterStorageType, DatabaseInsightsMode } from './cluster'; +import { ClusterScailabilityType, DatabaseCluster, DatabaseClusterProps, DBClusterStorageType } from './cluster'; +import { DatabaseInsightsMode } from './database-insights-mode'; +import { DatabaseInstance, DatabaseInstanceProps } from './instance'; import { PerformanceInsightRetention } from './props'; import { validateAllProps, ValidationRule } from '../../core/lib/helpers-internal'; -const standardDatabaseRules: ValidationRule[] = [ +/** + * Common validation rules for database insights + */ +const databaseInsightsRules: ValidationRule[] = [ { condition: (props) => props.enablePerformanceInsights === false && @@ -17,16 +22,21 @@ const standardDatabaseRules: ValidationRule[] = [ props.performanceInsightRetention !== PerformanceInsightRetention.MONTHS_15, message: () => '`performanceInsightRetention` must be set to \'${PerformanceInsightRetention.MONTHS_15}\' when `databaseInsightsMode` is set to \'${DatabaseInsightsMode.ADVANCED}\'', }, - { - condition: (props) => props.databaseInsightsMode !== undefined && !props.engine.engineType.startsWith('aurora'), - message: () => '`performanceInsightEncryptionKey` must be set when `databaseInsightsMode` is set to \'${DatabaseInsightsMode.ADVANCED}\'', - }, +]; + +/** + * Cluster-specific validation rules + */ +const clusterSpecificRules: ValidationRule[] = [ { condition: (props) => props.replicationSourceIdentifier !== undefined && props.credentials !== undefined, message: () => 'Cannot specify both `replicationSourceIdentifier` and `credentials`. The value is inherited from the source DB cluster', }, ]; +/** + * Rules for Aurora Limitless database + */ const limitlessDatabaseRules: ValidationRule[] = [ { condition: (props) => !props.enablePerformanceInsights, @@ -59,11 +69,21 @@ const limitlessDatabaseRules: ValidationRule[] = [ }, ]; +/** + * Validates database instance properties + */ +export function validateDatabaseInstanceProps(scope: Construct, props: DatabaseInstanceProps): void { + validateAllProps(scope, DatabaseInstance.name, props, databaseInsightsRules as ValidationRule[]); +} + +/** + * Validates database cluster properties + */ export function validateDatabaseClusterProps(scope: Construct, props: DatabaseClusterProps): void { const isLimitlessCluster = props.clusterScailabilityType === ClusterScailabilityType.LIMITLESS; const applicableRules = isLimitlessCluster - ? [...standardDatabaseRules, ...limitlessDatabaseRules] - : standardDatabaseRules; + ? [...databaseInsightsRules as ValidationRule[], ...clusterSpecificRules, ...limitlessDatabaseRules] + : [...databaseInsightsRules as ValidationRule[], ...clusterSpecificRules]; validateAllProps(scope, DatabaseCluster.name, props, applicableRules); } diff --git a/packages/aws-cdk-lib/aws-rds/test/instance.test.ts b/packages/aws-cdk-lib/aws-rds/test/instance.test.ts index 50c367d6b01ac..b9ce6e3da141e 100644 --- a/packages/aws-cdk-lib/aws-rds/test/instance.test.ts +++ b/packages/aws-cdk-lib/aws-rds/test/instance.test.ts @@ -2523,3 +2523,83 @@ describe('cross-account instance', () => { }); }); }); + +describe('database insights for instance', () => { + test('instance with the advanced mode of database insights', () => { + // GIVEN + stack = new cdk.Stack(); + vpc = new ec2.Vpc(stack, 'VPC'); + + // WHEN + new rds.DatabaseInstance(stack, 'Instance', { + engine: rds.DatabaseInstanceEngine.postgres({ version: rds.PostgresEngineVersion.VER_13_7 }), + instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE3, ec2.InstanceSize.MEDIUM), + vpc, + databaseInsightsMode: rds.DatabaseInsightsMode.ADVANCED, + performanceInsightRetention: rds.PerformanceInsightRetention.MONTHS_15, + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::RDS::DBInstance', { + EnablePerformanceInsights: true, + PerformanceInsightsRetentionPeriod: 465, + DatabaseInsightsMode: 'advanced', + }); + }); + + test.each([true, false])('instance with the standard mode of database insights when enablePerformanceInsights is %s', (enablePerformanceInsights) => { + // GIVEN + stack = new cdk.Stack(); + vpc = new ec2.Vpc(stack, 'VPC'); + + // WHEN + new rds.DatabaseInstance(stack, 'Instance', { + engine: rds.DatabaseInstanceEngine.postgres({ version: rds.PostgresEngineVersion.VER_17_5 }), + instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE3, ec2.InstanceSize.MEDIUM), + vpc, + enablePerformanceInsights, + databaseInsightsMode: rds.DatabaseInsightsMode.STANDARD, + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::RDS::DBInstance', { + EnablePerformanceInsights: enablePerformanceInsights, + DatabaseInsightsMode: 'standard', + }); + }); + + test('throw if performance insights is disabled and the advanced mode of database insights is set', () => { + // GIVEN + stack = new cdk.Stack(); + vpc = new ec2.Vpc(stack, 'VPC'); + + // THEN + expect(() => { + new rds.DatabaseInstance(stack, 'Instance', { + engine: rds.DatabaseInstanceEngine.postgres({ version: rds.PostgresEngineVersion.VER_17_5 }), + instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.LARGE), + vpc, + enablePerformanceInsights: false, + databaseInsightsMode: rds.DatabaseInsightsMode.ADVANCED, + performanceInsightRetention: rds.PerformanceInsightRetention.MONTHS_15, + }); + }).toThrow(/`enablePerformanceInsights` disabled, but `performanceInsightRetention` or `performanceInsightEncryptionKey` was set, or `databaseInsightsMode` was set to '\${DatabaseInsightsMode.ADVANCED}'/); + }); + + test('throw if the advanced mode of database insights is set and any retention other than MONTHS_15 is set for performanceInsightRetention', () => { + // GIVEN + stack = new cdk.Stack(); + vpc = new ec2.Vpc(stack, 'VPC'); + + // THEN + expect(() => { + new rds.DatabaseInstance(stack, 'Instance', { + engine: rds.DatabaseInstanceEngine.postgres({ version: rds.PostgresEngineVersion.VER_17_5 }), + instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.LARGE), + vpc, + performanceInsightRetention: rds.PerformanceInsightRetention.LONG_TERM, + databaseInsightsMode: rds.DatabaseInsightsMode.ADVANCED, + }); + }).toThrow(/`performanceInsightRetention` must be set to '\${PerformanceInsightRetention.MONTHS_15}' when `databaseInsightsMode` is set to '\${DatabaseInsightsMode.ADVANCED}'/); + }); +});