From 2c1e67017423008fd2430d953c5483ce6a96f047 Mon Sep 17 00:00:00 2001 From: maz Date: Tue, 7 May 2024 21:25:32 +0900 Subject: [PATCH 1/6] add copyTagsToSnapshot property --- packages/@aws-cdk/aws-neptune-alpha/README.md | 1 + .../@aws-cdk/aws-neptune-alpha/lib/cluster.ts | 10 + .../aws-neptune-alpha/test/cluster.test.ts | 53 + ...efaultTestDeployAssert6A1BBA9D.assets.json | 19 + ...aultTestDeployAssert6A1BBA9D.template.json | 36 + .../aws-cdk-neptune-integ.assets.json | 19 + .../aws-cdk-neptune-integ.template.json | 565 ++++++++++ .../cdk.out | 1 + .../integ.json | 12 + .../manifest.json | 293 ++++++ .../tree.json | 984 ++++++++++++++++++ .../integ.cluster-copy-tags-to-snapshot.ts | 28 + 12 files changed, 2021 insertions(+) create mode 100644 packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/ClusterTestDefaultTestDeployAssert6A1BBA9D.assets.json create mode 100644 packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/ClusterTestDefaultTestDeployAssert6A1BBA9D.template.json create mode 100644 packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/aws-cdk-neptune-integ.assets.json create mode 100644 packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/aws-cdk-neptune-integ.template.json create mode 100644 packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/cdk.out create mode 100644 packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/integ.json create mode 100644 packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/manifest.json create mode 100644 packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/tree.json create mode 100644 packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.ts diff --git a/packages/@aws-cdk/aws-neptune-alpha/README.md b/packages/@aws-cdk/aws-neptune-alpha/README.md index 7b636c7b1698a..9b7d247624de2 100644 --- a/packages/@aws-cdk/aws-neptune-alpha/README.md +++ b/packages/@aws-cdk/aws-neptune-alpha/README.md @@ -31,6 +31,7 @@ To set up a Neptune database, define a `DatabaseCluster`. You must always launch const cluster = new neptune.DatabaseCluster(this, 'Database', { vpc, instanceType: neptune.InstanceType.R5_LARGE, + copyTagsToSnapshot: true // whether to save the cluster tags when creating the snapshot. }); ``` diff --git a/packages/@aws-cdk/aws-neptune-alpha/lib/cluster.ts b/packages/@aws-cdk/aws-neptune-alpha/lib/cluster.ts index d8df337c8772d..fa82d5311c831 100644 --- a/packages/@aws-cdk/aws-neptune-alpha/lib/cluster.ts +++ b/packages/@aws-cdk/aws-neptune-alpha/lib/cluster.ts @@ -321,6 +321,13 @@ export interface DatabaseClusterProps { * @default - required if instanceType is db.serverless */ readonly serverlessScalingConfiguration?: ServerlessScalingConfiguration; + + /** + * Whether to copy tags to the snapshot when a snapshot is created. + * + * @default - not copy tags to the snapshot + */ + readonly copyTagsToSnapshot?: boolean; } /** @@ -616,6 +623,9 @@ export class DatabaseCluster extends DatabaseClusterBase implements IDatabaseClu enableCloudwatchLogsExports: props.cloudwatchLogsExports?.map(logType => logType.value), storageEncrypted, serverlessScalingConfiguration: props.serverlessScalingConfiguration, + // Tags + copyTagsToSnapshot: props.copyTagsToSnapshot, + }); cluster.applyRemovalPolicy(props.removalPolicy, { diff --git a/packages/@aws-cdk/aws-neptune-alpha/test/cluster.test.ts b/packages/@aws-cdk/aws-neptune-alpha/test/cluster.test.ts index dc9de61ce3768..3b29fc9c5b69a 100644 --- a/packages/@aws-cdk/aws-neptune-alpha/test/cluster.test.ts +++ b/packages/@aws-cdk/aws-neptune-alpha/test/cluster.test.ts @@ -879,6 +879,59 @@ describe('DatabaseCluster', () => { RetentionInDays: 30, }); }); + + test('cluster with copyTagsToSnapshot default', () => { + // GIVEN + const stack = testStack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + + // WHEN + new DatabaseCluster(stack, 'Database', { + vpc, + instanceType: InstanceType.R5_LARGE, + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::Neptune::DBCluster', { + CopyTagsToSnapshot: Match.absent(), + }); + }); + + test('cluster with copyTagsToSnapshot disabled', () => { + // GIVEN + const stack = testStack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + + // WHEN + new DatabaseCluster(stack, 'Database', { + vpc, + instanceType: InstanceType.R5_LARGE, + copyTagsToSnapshot: false, + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::Neptune::DBCluster', { + CopyTagsToSnapshot: false, + }); + }); + + test('cluster with copyTagsToSnapshot enabled', () => { + // GIVEN + const stack = testStack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + + // WHEN + new DatabaseCluster(stack, 'Database', { + vpc, + instanceType: InstanceType.R5_LARGE, + copyTagsToSnapshot: true, + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::Neptune::DBCluster', { + CopyTagsToSnapshot: true, + }); + }); }); function testStack() { diff --git a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/ClusterTestDefaultTestDeployAssert6A1BBA9D.assets.json b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/ClusterTestDefaultTestDeployAssert6A1BBA9D.assets.json new file mode 100644 index 0000000000000..1a49d2e15b492 --- /dev/null +++ b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/ClusterTestDefaultTestDeployAssert6A1BBA9D.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "ClusterTestDefaultTestDeployAssert6A1BBA9D.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/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/ClusterTestDefaultTestDeployAssert6A1BBA9D.template.json b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/ClusterTestDefaultTestDeployAssert6A1BBA9D.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/ClusterTestDefaultTestDeployAssert6A1BBA9D.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/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/aws-cdk-neptune-integ.assets.json b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/aws-cdk-neptune-integ.assets.json new file mode 100644 index 0000000000000..4a643712ccd19 --- /dev/null +++ b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/aws-cdk-neptune-integ.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "f3ecf9e76a2d8d64ee1bca6cf42b43068c6f084573e0a8703ed9763e88d88168": { + "source": { + "path": "aws-cdk-neptune-integ.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "f3ecf9e76a2d8d64ee1bca6cf42b43068c6f084573e0a8703ed9763e88d88168.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/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/aws-cdk-neptune-integ.template.json b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/aws-cdk-neptune-integ.template.json new file mode 100644 index 0000000000000..22fa62ff86948 --- /dev/null +++ b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/aws-cdk-neptune-integ.template.json @@ -0,0 +1,565 @@ +{ + "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-neptune-integ/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-neptune-integ/VPC/PublicSubnet1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPublicSubnet1RouteTableFEE4B781": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-neptune-integ/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-neptune-integ/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1NATGatewayE0556630": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet1EIP6AD938E8", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-neptune-integ/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-neptune-integ/VPC/PublicSubnet2" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPublicSubnet2RouteTable6F1A15F1": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-neptune-integ/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-neptune-integ/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2NATGateway3C070193": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet2EIP4947BC00", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-neptune-integ/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-neptune-integ/VPC/PrivateSubnet1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPrivateSubnet1RouteTableBE8A6027": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-neptune-integ/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-neptune-integ/VPC/PrivateSubnet2" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPrivateSubnet2RouteTable0A19E10E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-neptune-integ/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-neptune-integ/VPC" + } + ] + } + }, + "VPCVPCGW99B986DC": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "InternetGatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "DatabaseCopyTagsToSnapshotDisabledSubnetsD6191D0D": { + "Type": "AWS::Neptune::DBSubnetGroup", + "Properties": { + "DBSubnetGroupDescription": "Subnets for DatabaseCopyTagsToSnapshotDisabled database", + "SubnetIds": [ + { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + }, + { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + ] + } + }, + "DatabaseCopyTagsToSnapshotDisabledSecurityGroupDA546735": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "Neptune security group", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "DatabaseCopyTagsToSnapshotDisabled06721937": { + "Type": "AWS::Neptune::DBCluster", + "Properties": { + "CopyTagsToSnapshot": false, + "DBSubnetGroupName": { + "Ref": "DatabaseCopyTagsToSnapshotDisabledSubnetsD6191D0D" + }, + "StorageEncrypted": true, + "VpcSecurityGroupIds": [ + { + "Fn::GetAtt": [ + "DatabaseCopyTagsToSnapshotDisabledSecurityGroupDA546735", + "GroupId" + ] + } + ] + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "DatabaseCopyTagsToSnapshotDisabledInstance1437B1FA7": { + "Type": "AWS::Neptune::DBInstance", + "Properties": { + "AutoMinorVersionUpgrade": false, + "DBClusterIdentifier": { + "Ref": "DatabaseCopyTagsToSnapshotDisabled06721937" + }, + "DBInstanceClass": "db.r5.large" + }, + "DependsOn": [ + "VPCPrivateSubnet1DefaultRouteAE1D6490", + "VPCPrivateSubnet1RouteTableAssociation347902D1", + "VPCPrivateSubnet2DefaultRouteF4F5CFD2", + "VPCPrivateSubnet2RouteTableAssociation0C73D413" + ], + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "DatabaseCopyTagsToSnapshotEnabledSubnets3CE045F1": { + "Type": "AWS::Neptune::DBSubnetGroup", + "Properties": { + "DBSubnetGroupDescription": "Subnets for DatabaseCopyTagsToSnapshotEnabled database", + "SubnetIds": [ + { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + }, + { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + ] + } + }, + "DatabaseCopyTagsToSnapshotEnabledSecurityGroup227F101E": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "Neptune security group", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "DatabaseCopyTagsToSnapshotEnabled84786E21": { + "Type": "AWS::Neptune::DBCluster", + "Properties": { + "CopyTagsToSnapshot": true, + "DBSubnetGroupName": { + "Ref": "DatabaseCopyTagsToSnapshotEnabledSubnets3CE045F1" + }, + "StorageEncrypted": true, + "VpcSecurityGroupIds": [ + { + "Fn::GetAtt": [ + "DatabaseCopyTagsToSnapshotEnabledSecurityGroup227F101E", + "GroupId" + ] + } + ] + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "DatabaseCopyTagsToSnapshotEnabledInstance15DFB3914": { + "Type": "AWS::Neptune::DBInstance", + "Properties": { + "AutoMinorVersionUpgrade": false, + "DBClusterIdentifier": { + "Ref": "DatabaseCopyTagsToSnapshotEnabled84786E21" + }, + "DBInstanceClass": "db.r5.large" + }, + "DependsOn": [ + "VPCPrivateSubnet1DefaultRouteAE1D6490", + "VPCPrivateSubnet1RouteTableAssociation347902D1", + "VPCPrivateSubnet2DefaultRouteF4F5CFD2", + "VPCPrivateSubnet2RouteTableAssociation0C73D413" + ], + "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/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/cdk.out b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/cdk.out new file mode 100644 index 0000000000000..1f0068d32659a --- /dev/null +++ b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"36.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/integ.json b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/integ.json new file mode 100644 index 0000000000000..4d7b253875d40 --- /dev/null +++ b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "36.0.0", + "testCases": { + "ClusterTest/DefaultTest": { + "stacks": [ + "aws-cdk-neptune-integ" + ], + "assertionStack": "ClusterTest/DefaultTest/DeployAssert", + "assertionStackName": "ClusterTestDefaultTestDeployAssert6A1BBA9D" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/manifest.json b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/manifest.json new file mode 100644 index 0000000000000..1dd45424c539c --- /dev/null +++ b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/manifest.json @@ -0,0 +1,293 @@ +{ + "version": "36.0.0", + "artifacts": { + "aws-cdk-neptune-integ.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-cdk-neptune-integ.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-cdk-neptune-integ": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-cdk-neptune-integ.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}/f3ecf9e76a2d8d64ee1bca6cf42b43068c6f084573e0a8703ed9763e88d88168.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-cdk-neptune-integ.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-neptune-integ.assets" + ], + "metadata": { + "/aws-cdk-neptune-integ/VPC/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCB9E5F0B4" + } + ], + "/aws-cdk-neptune-integ/VPC/PublicSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1SubnetB4246D30" + } + ], + "/aws-cdk-neptune-integ/VPC/PublicSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1RouteTableFEE4B781" + } + ], + "/aws-cdk-neptune-integ/VPC/PublicSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1RouteTableAssociation0B0896DC" + } + ], + "/aws-cdk-neptune-integ/VPC/PublicSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1DefaultRoute91CEF279" + } + ], + "/aws-cdk-neptune-integ/VPC/PublicSubnet1/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1EIP6AD938E8" + } + ], + "/aws-cdk-neptune-integ/VPC/PublicSubnet1/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1NATGatewayE0556630" + } + ], + "/aws-cdk-neptune-integ/VPC/PublicSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2Subnet74179F39" + } + ], + "/aws-cdk-neptune-integ/VPC/PublicSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2RouteTable6F1A15F1" + } + ], + "/aws-cdk-neptune-integ/VPC/PublicSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2RouteTableAssociation5A808732" + } + ], + "/aws-cdk-neptune-integ/VPC/PublicSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2DefaultRouteB7481BBA" + } + ], + "/aws-cdk-neptune-integ/VPC/PublicSubnet2/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2EIP4947BC00" + } + ], + "/aws-cdk-neptune-integ/VPC/PublicSubnet2/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2NATGateway3C070193" + } + ], + "/aws-cdk-neptune-integ/VPC/PrivateSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1Subnet8BCA10E0" + } + ], + "/aws-cdk-neptune-integ/VPC/PrivateSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1RouteTableBE8A6027" + } + ], + "/aws-cdk-neptune-integ/VPC/PrivateSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1RouteTableAssociation347902D1" + } + ], + "/aws-cdk-neptune-integ/VPC/PrivateSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1DefaultRouteAE1D6490" + } + ], + "/aws-cdk-neptune-integ/VPC/PrivateSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + ], + "/aws-cdk-neptune-integ/VPC/PrivateSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2RouteTable0A19E10E" + } + ], + "/aws-cdk-neptune-integ/VPC/PrivateSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2RouteTableAssociation0C73D413" + } + ], + "/aws-cdk-neptune-integ/VPC/PrivateSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2DefaultRouteF4F5CFD2" + } + ], + "/aws-cdk-neptune-integ/VPC/IGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCIGWB7E252D3" + } + ], + "/aws-cdk-neptune-integ/VPC/VPCGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCVPCGW99B986DC" + } + ], + "/aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotDisabled/Subnets/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseCopyTagsToSnapshotDisabledSubnetsD6191D0D" + } + ], + "/aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotDisabled/SecurityGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseCopyTagsToSnapshotDisabledSecurityGroupDA546735" + } + ], + "/aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotDisabled/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseCopyTagsToSnapshotDisabled06721937" + } + ], + "/aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotDisabled/Instance1": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseCopyTagsToSnapshotDisabledInstance1437B1FA7" + } + ], + "/aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotEnabled/Subnets/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseCopyTagsToSnapshotEnabledSubnets3CE045F1" + } + ], + "/aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotEnabled/SecurityGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseCopyTagsToSnapshotEnabledSecurityGroup227F101E" + } + ], + "/aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotEnabled/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseCopyTagsToSnapshotEnabled84786E21" + } + ], + "/aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotEnabled/Instance1": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseCopyTagsToSnapshotEnabledInstance15DFB3914" + } + ], + "/aws-cdk-neptune-integ/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-cdk-neptune-integ/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-cdk-neptune-integ" + }, + "ClusterTestDefaultTestDeployAssert6A1BBA9D.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "ClusterTestDefaultTestDeployAssert6A1BBA9D.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "ClusterTestDefaultTestDeployAssert6A1BBA9D": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "ClusterTestDefaultTestDeployAssert6A1BBA9D.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": [ + "ClusterTestDefaultTestDeployAssert6A1BBA9D.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": [ + "ClusterTestDefaultTestDeployAssert6A1BBA9D.assets" + ], + "metadata": { + "/ClusterTest/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/ClusterTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "ClusterTest/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/tree.json b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/tree.json new file mode 100644 index 0000000000000..05d863847efd0 --- /dev/null +++ b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/tree.json @@ -0,0 +1,984 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "aws-cdk-neptune-integ": { + "id": "aws-cdk-neptune-integ", + "path": "aws-cdk-neptune-integ", + "children": { + "VPC": { + "id": "VPC", + "path": "aws-cdk-neptune-integ/VPC", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-neptune-integ/VPC/Resource", + "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-neptune-integ/VPC" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" + } + }, + "PublicSubnet1": { + "id": "PublicSubnet1", + "path": "aws-cdk-neptune-integ/VPC/PublicSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-neptune-integ/VPC/PublicSubnet1/Subnet", + "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-neptune-integ/VPC/PublicSubnet1" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-neptune-integ/VPC/PublicSubnet1/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-neptune-integ/VPC/PublicSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-cdk-neptune-integ/VPC/PublicSubnet1" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-neptune-integ/VPC/PublicSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "subnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-cdk-neptune-integ/VPC/PublicSubnet1/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "gatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "routeTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + }, + "EIP": { + "id": "EIP", + "path": "aws-cdk-neptune-integ/VPC/PublicSubnet1/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "aws-cdk-neptune-integ/VPC/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "aws-cdk-neptune-integ/VPC/PublicSubnet1/NATGateway", + "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-neptune-integ/VPC/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" + } + }, + "PublicSubnet2": { + "id": "PublicSubnet2", + "path": "aws-cdk-neptune-integ/VPC/PublicSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-neptune-integ/VPC/PublicSubnet2/Subnet", + "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-neptune-integ/VPC/PublicSubnet2" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-neptune-integ/VPC/PublicSubnet2/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-neptune-integ/VPC/PublicSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-cdk-neptune-integ/VPC/PublicSubnet2" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-neptune-integ/VPC/PublicSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "subnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-cdk-neptune-integ/VPC/PublicSubnet2/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "gatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "routeTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + }, + "EIP": { + "id": "EIP", + "path": "aws-cdk-neptune-integ/VPC/PublicSubnet2/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "aws-cdk-neptune-integ/VPC/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "aws-cdk-neptune-integ/VPC/PublicSubnet2/NATGateway", + "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-neptune-integ/VPC/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" + } + }, + "PrivateSubnet1": { + "id": "PrivateSubnet1", + "path": "aws-cdk-neptune-integ/VPC/PrivateSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-neptune-integ/VPC/PrivateSubnet1/Subnet", + "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-neptune-integ/VPC/PrivateSubnet1" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-neptune-integ/VPC/PrivateSubnet1/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-neptune-integ/VPC/PrivateSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-cdk-neptune-integ/VPC/PrivateSubnet1" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-neptune-integ/VPC/PrivateSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "subnetId": { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-cdk-neptune-integ/VPC/PrivateSubnet1/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "natGatewayId": { + "Ref": "VPCPublicSubnet1NATGatewayE0556630" + }, + "routeTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "PrivateSubnet2": { + "id": "PrivateSubnet2", + "path": "aws-cdk-neptune-integ/VPC/PrivateSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-neptune-integ/VPC/PrivateSubnet2/Subnet", + "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-neptune-integ/VPC/PrivateSubnet2" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-neptune-integ/VPC/PrivateSubnet2/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-neptune-integ/VPC/PrivateSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-cdk-neptune-integ/VPC/PrivateSubnet2" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-neptune-integ/VPC/PrivateSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "subnetId": { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-cdk-neptune-integ/VPC/PrivateSubnet2/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "natGatewayId": { + "Ref": "VPCPublicSubnet2NATGateway3C070193" + }, + "routeTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "IGW": { + "id": "IGW", + "path": "aws-cdk-neptune-integ/VPC/IGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::InternetGateway", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-cdk-neptune-integ/VPC" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" + } + }, + "VPCGW": { + "id": "VPCGW", + "path": "aws-cdk-neptune-integ/VPC/VPCGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::VPCGatewayAttachment", + "aws:cdk:cloudformation:props": { + "internetGatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0" + } + }, + "DatabaseCopyTagsToSnapshotDisabled": { + "id": "DatabaseCopyTagsToSnapshotDisabled", + "path": "aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotDisabled", + "children": { + "Subnets": { + "id": "Subnets", + "path": "aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotDisabled/Subnets", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotDisabled/Subnets/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Neptune::DBSubnetGroup", + "aws:cdk:cloudformation:props": { + "dbSubnetGroupDescription": "Subnets for DatabaseCopyTagsToSnapshotDisabled database", + "subnetIds": [ + { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + }, + { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_neptune.CfnDBSubnetGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-neptune-alpha.SubnetGroup", + "version": "0.0.0" + } + }, + "SecurityGroup": { + "id": "SecurityGroup", + "path": "aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotDisabled/SecurityGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotDisabled/SecurityGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", + "aws:cdk:cloudformation:props": { + "groupDescription": "Neptune security group", + "securityGroupEgress": [ + { + "cidrIp": "0.0.0.0/0", + "description": "Allow all outbound traffic by default", + "ipProtocol": "-1" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotDisabled/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Neptune::DBCluster", + "aws:cdk:cloudformation:props": { + "copyTagsToSnapshot": false, + "dbSubnetGroupName": { + "Ref": "DatabaseCopyTagsToSnapshotDisabledSubnetsD6191D0D" + }, + "storageEncrypted": true, + "vpcSecurityGroupIds": [ + { + "Fn::GetAtt": [ + "DatabaseCopyTagsToSnapshotDisabledSecurityGroupDA546735", + "GroupId" + ] + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_neptune.CfnDBCluster", + "version": "0.0.0" + } + }, + "Instance1": { + "id": "Instance1", + "path": "aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotDisabled/Instance1", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Neptune::DBInstance", + "aws:cdk:cloudformation:props": { + "autoMinorVersionUpgrade": false, + "dbClusterIdentifier": { + "Ref": "DatabaseCopyTagsToSnapshotDisabled06721937" + }, + "dbInstanceClass": "db.r5.large" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_neptune.CfnDBInstance", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-neptune-alpha.DatabaseCluster", + "version": "0.0.0" + } + }, + "DatabaseCopyTagsToSnapshotEnabled": { + "id": "DatabaseCopyTagsToSnapshotEnabled", + "path": "aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotEnabled", + "children": { + "Subnets": { + "id": "Subnets", + "path": "aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotEnabled/Subnets", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotEnabled/Subnets/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Neptune::DBSubnetGroup", + "aws:cdk:cloudformation:props": { + "dbSubnetGroupDescription": "Subnets for DatabaseCopyTagsToSnapshotEnabled database", + "subnetIds": [ + { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + }, + { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_neptune.CfnDBSubnetGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-neptune-alpha.SubnetGroup", + "version": "0.0.0" + } + }, + "SecurityGroup": { + "id": "SecurityGroup", + "path": "aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotEnabled/SecurityGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotEnabled/SecurityGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", + "aws:cdk:cloudformation:props": { + "groupDescription": "Neptune security group", + "securityGroupEgress": [ + { + "cidrIp": "0.0.0.0/0", + "description": "Allow all outbound traffic by default", + "ipProtocol": "-1" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotEnabled/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Neptune::DBCluster", + "aws:cdk:cloudformation:props": { + "copyTagsToSnapshot": true, + "dbSubnetGroupName": { + "Ref": "DatabaseCopyTagsToSnapshotEnabledSubnets3CE045F1" + }, + "storageEncrypted": true, + "vpcSecurityGroupIds": [ + { + "Fn::GetAtt": [ + "DatabaseCopyTagsToSnapshotEnabledSecurityGroup227F101E", + "GroupId" + ] + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_neptune.CfnDBCluster", + "version": "0.0.0" + } + }, + "Instance1": { + "id": "Instance1", + "path": "aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotEnabled/Instance1", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Neptune::DBInstance", + "aws:cdk:cloudformation:props": { + "autoMinorVersionUpgrade": false, + "dbClusterIdentifier": { + "Ref": "DatabaseCopyTagsToSnapshotEnabled84786E21" + }, + "dbInstanceClass": "db.r5.large" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_neptune.CfnDBInstance", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-neptune-alpha.DatabaseCluster", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-cdk-neptune-integ/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-cdk-neptune-integ/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "ClusterTest": { + "id": "ClusterTest", + "path": "ClusterTest", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "ClusterTest/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "ClusterTest/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "ClusterTest/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "ClusterTest/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "ClusterTest/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/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.ts b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.ts new file mode 100644 index 0000000000000..53bc52b74aab3 --- /dev/null +++ b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.ts @@ -0,0 +1,28 @@ +import * as ec2 from 'aws-cdk-lib/aws-ec2'; +import * as cdk from 'aws-cdk-lib'; +import * as integ from '@aws-cdk/integ-tests-alpha'; +import { DatabaseCluster, InstanceType } from '../lib'; + +const app = new cdk.App(); + +const stack = new cdk.Stack(app, 'aws-cdk-neptune-integ'); + +const vpc = new ec2.Vpc(stack, 'VPC', { maxAzs: 2, restrictDefaultSecurityGroup: false }); + +new DatabaseCluster(stack, 'DatabaseCopyTagsToSnapshotDisabled', { + vpc, + instanceType: InstanceType.R5_LARGE, + copyTagsToSnapshot: false, +}); + +new DatabaseCluster(stack, 'DatabaseCopyTagsToSnapshotEnabled', { + vpc, + instanceType: InstanceType.R5_LARGE, + copyTagsToSnapshot: true, +}); + +new integ.IntegTest(app, 'ClusterTest', { + testCases: [stack], +}); + +app.synth(); From dd0445a0e64359c103ff0db4e1bb249d3be0e553 Mon Sep 17 00:00:00 2001 From: maz Date: Sat, 11 May 2024 10:58:15 +0900 Subject: [PATCH 2/6] fix: docs and unit tests --- .../@aws-cdk/aws-neptune-alpha/lib/cluster.ts | 6 ++--- .../aws-neptune-alpha/test/cluster.test.ts | 25 +++---------------- 2 files changed, 6 insertions(+), 25 deletions(-) diff --git a/packages/@aws-cdk/aws-neptune-alpha/lib/cluster.ts b/packages/@aws-cdk/aws-neptune-alpha/lib/cluster.ts index fa82d5311c831..f2d49265f79ba 100644 --- a/packages/@aws-cdk/aws-neptune-alpha/lib/cluster.ts +++ b/packages/@aws-cdk/aws-neptune-alpha/lib/cluster.ts @@ -85,7 +85,7 @@ export class EngineVersion { * Constructor for specifying a custom engine version * @param version the engine version of Neptune */ - public constructor(public readonly version: string) {} + public constructor(public readonly version: string) { } } /** @@ -105,7 +105,7 @@ export class LogType { * Constructor for specifying a custom log type * @param value the log type */ - public constructor(public readonly value: string) {} + public constructor(public readonly value: string) { } } export interface ServerlessScalingConfiguration { @@ -325,7 +325,7 @@ export interface DatabaseClusterProps { /** * Whether to copy tags to the snapshot when a snapshot is created. * - * @default - not copy tags to the snapshot + * @default - false */ readonly copyTagsToSnapshot?: boolean; } diff --git a/packages/@aws-cdk/aws-neptune-alpha/test/cluster.test.ts b/packages/@aws-cdk/aws-neptune-alpha/test/cluster.test.ts index 3b29fc9c5b69a..33cddc8d8dff0 100644 --- a/packages/@aws-cdk/aws-neptune-alpha/test/cluster.test.ts +++ b/packages/@aws-cdk/aws-neptune-alpha/test/cluster.test.ts @@ -897,26 +897,7 @@ describe('DatabaseCluster', () => { }); }); - test('cluster with copyTagsToSnapshot disabled', () => { - // GIVEN - const stack = testStack(); - const vpc = new ec2.Vpc(stack, 'VPC'); - - // WHEN - new DatabaseCluster(stack, 'Database', { - vpc, - instanceType: InstanceType.R5_LARGE, - copyTagsToSnapshot: false, - }); - - // THEN - Template.fromStack(stack).hasResourceProperties('AWS::Neptune::DBCluster', { - CopyTagsToSnapshot: false, - }); - }); - - test('cluster with copyTagsToSnapshot enabled', () => { - // GIVEN + test.each([false, true])('cluster with copyTagsToSnapshot set', (value) => { const stack = testStack(); const vpc = new ec2.Vpc(stack, 'VPC'); @@ -924,12 +905,12 @@ describe('DatabaseCluster', () => { new DatabaseCluster(stack, 'Database', { vpc, instanceType: InstanceType.R5_LARGE, - copyTagsToSnapshot: true, + copyTagsToSnapshot: value, }); // THEN Template.fromStack(stack).hasResourceProperties('AWS::Neptune::DBCluster', { - CopyTagsToSnapshot: true, + CopyTagsToSnapshot: value, }); }); }); From f163665b4dc7e2295d5df9304bc3af2a59eee618 Mon Sep 17 00:00:00 2001 From: mazyu36 Date: Wed, 15 May 2024 21:57:08 +0900 Subject: [PATCH 3/6] Update packages/@aws-cdk/aws-neptune-alpha/lib/cluster.ts Co-authored-by: k.goto <24818752+go-to-k@users.noreply.github.com> --- packages/@aws-cdk/aws-neptune-alpha/lib/cluster.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/@aws-cdk/aws-neptune-alpha/lib/cluster.ts b/packages/@aws-cdk/aws-neptune-alpha/lib/cluster.ts index f2d49265f79ba..e4d397f238220 100644 --- a/packages/@aws-cdk/aws-neptune-alpha/lib/cluster.ts +++ b/packages/@aws-cdk/aws-neptune-alpha/lib/cluster.ts @@ -625,7 +625,6 @@ export class DatabaseCluster extends DatabaseClusterBase implements IDatabaseClu serverlessScalingConfiguration: props.serverlessScalingConfiguration, // Tags copyTagsToSnapshot: props.copyTagsToSnapshot, - }); cluster.applyRemovalPolicy(props.removalPolicy, { From 67bc1a9b510202c9b567a86373d15cbb6b7d4a06 Mon Sep 17 00:00:00 2001 From: mazyu36 Date: Wed, 15 May 2024 21:57:19 +0900 Subject: [PATCH 4/6] Update packages/@aws-cdk/aws-neptune-alpha/test/cluster.test.ts Co-authored-by: k.goto <24818752+go-to-k@users.noreply.github.com> --- packages/@aws-cdk/aws-neptune-alpha/test/cluster.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-neptune-alpha/test/cluster.test.ts b/packages/@aws-cdk/aws-neptune-alpha/test/cluster.test.ts index 33cddc8d8dff0..223966581c395 100644 --- a/packages/@aws-cdk/aws-neptune-alpha/test/cluster.test.ts +++ b/packages/@aws-cdk/aws-neptune-alpha/test/cluster.test.ts @@ -880,7 +880,7 @@ describe('DatabaseCluster', () => { }); }); - test('cluster with copyTagsToSnapshot default', () => { + test('copyTagsToSnapshot is not set by default', () => { // GIVEN const stack = testStack(); const vpc = new ec2.Vpc(stack, 'VPC'); From d43f883279ac2f47fc065d4fa198ed7f2d95b563 Mon Sep 17 00:00:00 2001 From: maz Date: Wed, 15 May 2024 23:34:37 +0900 Subject: [PATCH 5/6] fix: update integ tests --- ...e-integ-copy-tags-to-snapshot.assets.json} | 6 +- ...integ-copy-tags-to-snapshot.template.json} | 44 +-- .../integ.json | 2 +- .../manifest.json | 82 ++--- .../tree.json | 342 +++++++++--------- .../integ.cluster-copy-tags-to-snapshot.ts | 4 +- 6 files changed, 241 insertions(+), 239 deletions(-) rename packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/{aws-cdk-neptune-integ.assets.json => aws-cdk-neptune-integ-copy-tags-to-snapshot.assets.json} (63%) rename packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/{aws-cdk-neptune-integ.template.json => aws-cdk-neptune-integ-copy-tags-to-snapshot.template.json} (89%) diff --git a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/aws-cdk-neptune-integ.assets.json b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/aws-cdk-neptune-integ-copy-tags-to-snapshot.assets.json similarity index 63% rename from packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/aws-cdk-neptune-integ.assets.json rename to packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/aws-cdk-neptune-integ-copy-tags-to-snapshot.assets.json index 4a643712ccd19..bea17ed2ac3ab 100644 --- a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/aws-cdk-neptune-integ.assets.json +++ b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/aws-cdk-neptune-integ-copy-tags-to-snapshot.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "f3ecf9e76a2d8d64ee1bca6cf42b43068c6f084573e0a8703ed9763e88d88168": { + "a57522de53101cd95696abb302681e2a1002f0ea0beffe8e2acdf6df1fd35852": { "source": { - "path": "aws-cdk-neptune-integ.template.json", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot.template.json", "packaging": "file" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "f3ecf9e76a2d8d64ee1bca6cf42b43068c6f084573e0a8703ed9763e88d88168.json", + "objectKey": "a57522de53101cd95696abb302681e2a1002f0ea0beffe8e2acdf6df1fd35852.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/aws-cdk-neptune-integ.template.json b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/aws-cdk-neptune-integ-copy-tags-to-snapshot.template.json similarity index 89% rename from packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/aws-cdk-neptune-integ.template.json rename to packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/aws-cdk-neptune-integ-copy-tags-to-snapshot.template.json index 22fa62ff86948..00aa768e24158 100644 --- a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/aws-cdk-neptune-integ.template.json +++ b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/aws-cdk-neptune-integ-copy-tags-to-snapshot.template.json @@ -10,7 +10,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-cdk-neptune-integ/VPC" + "Value": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC" } ] } @@ -39,7 +39,7 @@ }, { "Key": "Name", - "Value": "aws-cdk-neptune-integ/VPC/PublicSubnet1" + "Value": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet1" } ], "VpcId": { @@ -53,7 +53,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-cdk-neptune-integ/VPC/PublicSubnet1" + "Value": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet1" } ], "VpcId": { @@ -94,7 +94,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-cdk-neptune-integ/VPC/PublicSubnet1" + "Value": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet1" } ] } @@ -114,7 +114,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-cdk-neptune-integ/VPC/PublicSubnet1" + "Value": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet1" } ] }, @@ -147,7 +147,7 @@ }, { "Key": "Name", - "Value": "aws-cdk-neptune-integ/VPC/PublicSubnet2" + "Value": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet2" } ], "VpcId": { @@ -161,7 +161,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-cdk-neptune-integ/VPC/PublicSubnet2" + "Value": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet2" } ], "VpcId": { @@ -202,7 +202,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-cdk-neptune-integ/VPC/PublicSubnet2" + "Value": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet2" } ] } @@ -222,7 +222,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-cdk-neptune-integ/VPC/PublicSubnet2" + "Value": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet2" } ] }, @@ -255,7 +255,7 @@ }, { "Key": "Name", - "Value": "aws-cdk-neptune-integ/VPC/PrivateSubnet1" + "Value": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PrivateSubnet1" } ], "VpcId": { @@ -269,7 +269,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-cdk-neptune-integ/VPC/PrivateSubnet1" + "Value": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PrivateSubnet1" } ], "VpcId": { @@ -324,7 +324,7 @@ }, { "Key": "Name", - "Value": "aws-cdk-neptune-integ/VPC/PrivateSubnet2" + "Value": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PrivateSubnet2" } ], "VpcId": { @@ -338,7 +338,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-cdk-neptune-integ/VPC/PrivateSubnet2" + "Value": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PrivateSubnet2" } ], "VpcId": { @@ -375,7 +375,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-cdk-neptune-integ/VPC" + "Value": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC" } ] } @@ -438,8 +438,8 @@ } ] }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" }, "DatabaseCopyTagsToSnapshotDisabledInstance1437B1FA7": { "Type": "AWS::Neptune::DBInstance", @@ -456,8 +456,8 @@ "VPCPrivateSubnet2DefaultRouteF4F5CFD2", "VPCPrivateSubnet2RouteTableAssociation0C73D413" ], - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" }, "DatabaseCopyTagsToSnapshotEnabledSubnets3CE045F1": { "Type": "AWS::Neptune::DBSubnetGroup", @@ -506,8 +506,8 @@ } ] }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" }, "DatabaseCopyTagsToSnapshotEnabledInstance15DFB3914": { "Type": "AWS::Neptune::DBInstance", @@ -524,8 +524,8 @@ "VPCPrivateSubnet2DefaultRouteF4F5CFD2", "VPCPrivateSubnet2RouteTableAssociation0C73D413" ], - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Parameters": { diff --git a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/integ.json b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/integ.json index 4d7b253875d40..c89e673dbabbe 100644 --- a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/integ.json @@ -3,7 +3,7 @@ "testCases": { "ClusterTest/DefaultTest": { "stacks": [ - "aws-cdk-neptune-integ" + "aws-cdk-neptune-integ-copy-tags-to-snapshot" ], "assertionStack": "ClusterTest/DefaultTest/DeployAssert", "assertionStackName": "ClusterTestDefaultTestDeployAssert6A1BBA9D" diff --git a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/manifest.json b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/manifest.json index 1dd45424c539c..bdd82c61db019 100644 --- a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/manifest.json @@ -1,28 +1,28 @@ { "version": "36.0.0", "artifacts": { - "aws-cdk-neptune-integ.assets": { + "aws-cdk-neptune-integ-copy-tags-to-snapshot.assets": { "type": "cdk:asset-manifest", "properties": { - "file": "aws-cdk-neptune-integ.assets.json", + "file": "aws-cdk-neptune-integ-copy-tags-to-snapshot.assets.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" } }, - "aws-cdk-neptune-integ": { + "aws-cdk-neptune-integ-copy-tags-to-snapshot": { "type": "aws:cloudformation:stack", "environment": "aws://unknown-account/unknown-region", "properties": { - "templateFile": "aws-cdk-neptune-integ.template.json", + "templateFile": "aws-cdk-neptune-integ-copy-tags-to-snapshot.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}/f3ecf9e76a2d8d64ee1bca6cf42b43068c6f084573e0a8703ed9763e88d88168.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a57522de53101cd95696abb302681e2a1002f0ea0beffe8e2acdf6df1fd35852.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ - "aws-cdk-neptune-integ.assets" + "aws-cdk-neptune-integ-copy-tags-to-snapshot.assets" ], "lookupRole": { "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", @@ -31,209 +31,209 @@ } }, "dependencies": [ - "aws-cdk-neptune-integ.assets" + "aws-cdk-neptune-integ-copy-tags-to-snapshot.assets" ], "metadata": { - "/aws-cdk-neptune-integ/VPC/Resource": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/Resource": [ { "type": "aws:cdk:logicalId", "data": "VPCB9E5F0B4" } ], - "/aws-cdk-neptune-integ/VPC/PublicSubnet1/Subnet": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet1/Subnet": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet1SubnetB4246D30" } ], - "/aws-cdk-neptune-integ/VPC/PublicSubnet1/RouteTable": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet1/RouteTable": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet1RouteTableFEE4B781" } ], - "/aws-cdk-neptune-integ/VPC/PublicSubnet1/RouteTableAssociation": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet1/RouteTableAssociation": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet1RouteTableAssociation0B0896DC" } ], - "/aws-cdk-neptune-integ/VPC/PublicSubnet1/DefaultRoute": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet1/DefaultRoute": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet1DefaultRoute91CEF279" } ], - "/aws-cdk-neptune-integ/VPC/PublicSubnet1/EIP": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet1/EIP": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet1EIP6AD938E8" } ], - "/aws-cdk-neptune-integ/VPC/PublicSubnet1/NATGateway": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet1/NATGateway": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet1NATGatewayE0556630" } ], - "/aws-cdk-neptune-integ/VPC/PublicSubnet2/Subnet": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet2/Subnet": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet2Subnet74179F39" } ], - "/aws-cdk-neptune-integ/VPC/PublicSubnet2/RouteTable": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet2/RouteTable": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet2RouteTable6F1A15F1" } ], - "/aws-cdk-neptune-integ/VPC/PublicSubnet2/RouteTableAssociation": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet2/RouteTableAssociation": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet2RouteTableAssociation5A808732" } ], - "/aws-cdk-neptune-integ/VPC/PublicSubnet2/DefaultRoute": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet2/DefaultRoute": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet2DefaultRouteB7481BBA" } ], - "/aws-cdk-neptune-integ/VPC/PublicSubnet2/EIP": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet2/EIP": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet2EIP4947BC00" } ], - "/aws-cdk-neptune-integ/VPC/PublicSubnet2/NATGateway": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet2/NATGateway": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet2NATGateway3C070193" } ], - "/aws-cdk-neptune-integ/VPC/PrivateSubnet1/Subnet": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PrivateSubnet1/Subnet": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet1Subnet8BCA10E0" } ], - "/aws-cdk-neptune-integ/VPC/PrivateSubnet1/RouteTable": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PrivateSubnet1/RouteTable": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet1RouteTableBE8A6027" } ], - "/aws-cdk-neptune-integ/VPC/PrivateSubnet1/RouteTableAssociation": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PrivateSubnet1/RouteTableAssociation": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet1RouteTableAssociation347902D1" } ], - "/aws-cdk-neptune-integ/VPC/PrivateSubnet1/DefaultRoute": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PrivateSubnet1/DefaultRoute": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet1DefaultRouteAE1D6490" } ], - "/aws-cdk-neptune-integ/VPC/PrivateSubnet2/Subnet": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PrivateSubnet2/Subnet": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet2SubnetCFCDAA7A" } ], - "/aws-cdk-neptune-integ/VPC/PrivateSubnet2/RouteTable": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PrivateSubnet2/RouteTable": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet2RouteTable0A19E10E" } ], - "/aws-cdk-neptune-integ/VPC/PrivateSubnet2/RouteTableAssociation": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PrivateSubnet2/RouteTableAssociation": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet2RouteTableAssociation0C73D413" } ], - "/aws-cdk-neptune-integ/VPC/PrivateSubnet2/DefaultRoute": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PrivateSubnet2/DefaultRoute": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet2DefaultRouteF4F5CFD2" } ], - "/aws-cdk-neptune-integ/VPC/IGW": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/IGW": [ { "type": "aws:cdk:logicalId", "data": "VPCIGWB7E252D3" } ], - "/aws-cdk-neptune-integ/VPC/VPCGW": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/VPCGW": [ { "type": "aws:cdk:logicalId", "data": "VPCVPCGW99B986DC" } ], - "/aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotDisabled/Subnets/Resource": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/DatabaseCopyTagsToSnapshotDisabled/Subnets/Resource": [ { "type": "aws:cdk:logicalId", "data": "DatabaseCopyTagsToSnapshotDisabledSubnetsD6191D0D" } ], - "/aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotDisabled/SecurityGroup/Resource": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/DatabaseCopyTagsToSnapshotDisabled/SecurityGroup/Resource": [ { "type": "aws:cdk:logicalId", "data": "DatabaseCopyTagsToSnapshotDisabledSecurityGroupDA546735" } ], - "/aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotDisabled/Resource": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/DatabaseCopyTagsToSnapshotDisabled/Resource": [ { "type": "aws:cdk:logicalId", "data": "DatabaseCopyTagsToSnapshotDisabled06721937" } ], - "/aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotDisabled/Instance1": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/DatabaseCopyTagsToSnapshotDisabled/Instance1": [ { "type": "aws:cdk:logicalId", "data": "DatabaseCopyTagsToSnapshotDisabledInstance1437B1FA7" } ], - "/aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotEnabled/Subnets/Resource": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/DatabaseCopyTagsToSnapshotEnabled/Subnets/Resource": [ { "type": "aws:cdk:logicalId", "data": "DatabaseCopyTagsToSnapshotEnabledSubnets3CE045F1" } ], - "/aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotEnabled/SecurityGroup/Resource": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/DatabaseCopyTagsToSnapshotEnabled/SecurityGroup/Resource": [ { "type": "aws:cdk:logicalId", "data": "DatabaseCopyTagsToSnapshotEnabledSecurityGroup227F101E" } ], - "/aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotEnabled/Resource": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/DatabaseCopyTagsToSnapshotEnabled/Resource": [ { "type": "aws:cdk:logicalId", "data": "DatabaseCopyTagsToSnapshotEnabled84786E21" } ], - "/aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotEnabled/Instance1": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/DatabaseCopyTagsToSnapshotEnabled/Instance1": [ { "type": "aws:cdk:logicalId", "data": "DatabaseCopyTagsToSnapshotEnabledInstance15DFB3914" } ], - "/aws-cdk-neptune-integ/BootstrapVersion": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/BootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "BootstrapVersion" } ], - "/aws-cdk-neptune-integ/CheckBootstrapVersion": [ + "/aws-cdk-neptune-integ-copy-tags-to-snapshot/CheckBootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } ] }, - "displayName": "aws-cdk-neptune-integ" + "displayName": "aws-cdk-neptune-integ-copy-tags-to-snapshot" }, "ClusterTestDefaultTestDeployAssert6A1BBA9D.assets": { "type": "cdk:asset-manifest", diff --git a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/tree.json b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/tree.json index 05d863847efd0..2ed2fc7f5e920 100644 --- a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.js.snapshot/tree.json @@ -4,17 +4,17 @@ "id": "App", "path": "", "children": { - "aws-cdk-neptune-integ": { - "id": "aws-cdk-neptune-integ", - "path": "aws-cdk-neptune-integ", + "aws-cdk-neptune-integ-copy-tags-to-snapshot": { + "id": "aws-cdk-neptune-integ-copy-tags-to-snapshot", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot", "children": { "VPC": { "id": "VPC", - "path": "aws-cdk-neptune-integ/VPC", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC", "children": { "Resource": { "id": "Resource", - "path": "aws-cdk-neptune-integ/VPC/Resource", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::VPC", "aws:cdk:cloudformation:props": { @@ -25,23 +25,23 @@ "tags": [ { "key": "Name", - "value": "aws-cdk-neptune-integ/VPC" + "value": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC" } ] } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "PublicSubnet1": { "id": "PublicSubnet1", - "path": "aws-cdk-neptune-integ/VPC/PublicSubnet1", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet1", "children": { "Subnet": { "id": "Subnet", - "path": "aws-cdk-neptune-integ/VPC/PublicSubnet1/Subnet", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet1/Subnet", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { @@ -66,7 +66,7 @@ }, { "key": "Name", - "value": "aws-cdk-neptune-integ/VPC/PublicSubnet1" + "value": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet1" } ], "vpcId": { @@ -75,28 +75,28 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Acl": { "id": "Acl", - "path": "aws-cdk-neptune-integ/VPC/PublicSubnet1/Acl", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet1/Acl", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "RouteTable": { "id": "RouteTable", - "path": "aws-cdk-neptune-integ/VPC/PublicSubnet1/RouteTable", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet1/RouteTable", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { "tags": [ { "key": "Name", - "value": "aws-cdk-neptune-integ/VPC/PublicSubnet1" + "value": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet1" } ], "vpcId": { @@ -105,13 +105,13 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "RouteTableAssociation": { "id": "RouteTableAssociation", - "path": "aws-cdk-neptune-integ/VPC/PublicSubnet1/RouteTableAssociation", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet1/RouteTableAssociation", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", "aws:cdk:cloudformation:props": { @@ -124,13 +124,13 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultRoute": { "id": "DefaultRoute", - "path": "aws-cdk-neptune-integ/VPC/PublicSubnet1/DefaultRoute", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet1/DefaultRoute", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { @@ -144,13 +144,13 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "EIP": { "id": "EIP", - "path": "aws-cdk-neptune-integ/VPC/PublicSubnet1/EIP", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet1/EIP", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::EIP", "aws:cdk:cloudformation:props": { @@ -158,19 +158,19 @@ "tags": [ { "key": "Name", - "value": "aws-cdk-neptune-integ/VPC/PublicSubnet1" + "value": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet1" } ] } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "NATGateway": { "id": "NATGateway", - "path": "aws-cdk-neptune-integ/VPC/PublicSubnet1/NATGateway", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet1/NATGateway", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", "aws:cdk:cloudformation:props": { @@ -186,29 +186,29 @@ "tags": [ { "key": "Name", - "value": "aws-cdk-neptune-integ/VPC/PublicSubnet1" + "value": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet1" } ] } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "PublicSubnet2": { "id": "PublicSubnet2", - "path": "aws-cdk-neptune-integ/VPC/PublicSubnet2", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet2", "children": { "Subnet": { "id": "Subnet", - "path": "aws-cdk-neptune-integ/VPC/PublicSubnet2/Subnet", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet2/Subnet", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { @@ -233,7 +233,7 @@ }, { "key": "Name", - "value": "aws-cdk-neptune-integ/VPC/PublicSubnet2" + "value": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet2" } ], "vpcId": { @@ -242,28 +242,28 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Acl": { "id": "Acl", - "path": "aws-cdk-neptune-integ/VPC/PublicSubnet2/Acl", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet2/Acl", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "RouteTable": { "id": "RouteTable", - "path": "aws-cdk-neptune-integ/VPC/PublicSubnet2/RouteTable", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet2/RouteTable", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { "tags": [ { "key": "Name", - "value": "aws-cdk-neptune-integ/VPC/PublicSubnet2" + "value": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet2" } ], "vpcId": { @@ -272,13 +272,13 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "RouteTableAssociation": { "id": "RouteTableAssociation", - "path": "aws-cdk-neptune-integ/VPC/PublicSubnet2/RouteTableAssociation", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet2/RouteTableAssociation", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", "aws:cdk:cloudformation:props": { @@ -291,13 +291,13 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultRoute": { "id": "DefaultRoute", - "path": "aws-cdk-neptune-integ/VPC/PublicSubnet2/DefaultRoute", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet2/DefaultRoute", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { @@ -311,13 +311,13 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "EIP": { "id": "EIP", - "path": "aws-cdk-neptune-integ/VPC/PublicSubnet2/EIP", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet2/EIP", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::EIP", "aws:cdk:cloudformation:props": { @@ -325,19 +325,19 @@ "tags": [ { "key": "Name", - "value": "aws-cdk-neptune-integ/VPC/PublicSubnet2" + "value": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet2" } ] } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "NATGateway": { "id": "NATGateway", - "path": "aws-cdk-neptune-integ/VPC/PublicSubnet2/NATGateway", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet2/NATGateway", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", "aws:cdk:cloudformation:props": { @@ -353,29 +353,29 @@ "tags": [ { "key": "Name", - "value": "aws-cdk-neptune-integ/VPC/PublicSubnet2" + "value": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PublicSubnet2" } ] } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "PrivateSubnet1": { "id": "PrivateSubnet1", - "path": "aws-cdk-neptune-integ/VPC/PrivateSubnet1", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PrivateSubnet1", "children": { "Subnet": { "id": "Subnet", - "path": "aws-cdk-neptune-integ/VPC/PrivateSubnet1/Subnet", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PrivateSubnet1/Subnet", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { @@ -400,7 +400,7 @@ }, { "key": "Name", - "value": "aws-cdk-neptune-integ/VPC/PrivateSubnet1" + "value": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PrivateSubnet1" } ], "vpcId": { @@ -409,28 +409,28 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Acl": { "id": "Acl", - "path": "aws-cdk-neptune-integ/VPC/PrivateSubnet1/Acl", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PrivateSubnet1/Acl", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "RouteTable": { "id": "RouteTable", - "path": "aws-cdk-neptune-integ/VPC/PrivateSubnet1/RouteTable", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PrivateSubnet1/RouteTable", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { "tags": [ { "key": "Name", - "value": "aws-cdk-neptune-integ/VPC/PrivateSubnet1" + "value": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PrivateSubnet1" } ], "vpcId": { @@ -439,13 +439,13 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "RouteTableAssociation": { "id": "RouteTableAssociation", - "path": "aws-cdk-neptune-integ/VPC/PrivateSubnet1/RouteTableAssociation", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PrivateSubnet1/RouteTableAssociation", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", "aws:cdk:cloudformation:props": { @@ -458,13 +458,13 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultRoute": { "id": "DefaultRoute", - "path": "aws-cdk-neptune-integ/VPC/PrivateSubnet1/DefaultRoute", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PrivateSubnet1/DefaultRoute", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { @@ -478,23 +478,23 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "PrivateSubnet2": { "id": "PrivateSubnet2", - "path": "aws-cdk-neptune-integ/VPC/PrivateSubnet2", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PrivateSubnet2", "children": { "Subnet": { "id": "Subnet", - "path": "aws-cdk-neptune-integ/VPC/PrivateSubnet2/Subnet", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PrivateSubnet2/Subnet", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { @@ -519,7 +519,7 @@ }, { "key": "Name", - "value": "aws-cdk-neptune-integ/VPC/PrivateSubnet2" + "value": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PrivateSubnet2" } ], "vpcId": { @@ -528,28 +528,28 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Acl": { "id": "Acl", - "path": "aws-cdk-neptune-integ/VPC/PrivateSubnet2/Acl", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PrivateSubnet2/Acl", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "RouteTable": { "id": "RouteTable", - "path": "aws-cdk-neptune-integ/VPC/PrivateSubnet2/RouteTable", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PrivateSubnet2/RouteTable", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { "tags": [ { "key": "Name", - "value": "aws-cdk-neptune-integ/VPC/PrivateSubnet2" + "value": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PrivateSubnet2" } ], "vpcId": { @@ -558,13 +558,13 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "RouteTableAssociation": { "id": "RouteTableAssociation", - "path": "aws-cdk-neptune-integ/VPC/PrivateSubnet2/RouteTableAssociation", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PrivateSubnet2/RouteTableAssociation", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", "aws:cdk:cloudformation:props": { @@ -577,13 +577,13 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultRoute": { "id": "DefaultRoute", - "path": "aws-cdk-neptune-integ/VPC/PrivateSubnet2/DefaultRoute", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/PrivateSubnet2/DefaultRoute", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { @@ -597,38 +597,38 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "IGW": { "id": "IGW", - "path": "aws-cdk-neptune-integ/VPC/IGW", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/IGW", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::InternetGateway", "aws:cdk:cloudformation:props": { "tags": [ { "key": "Name", - "value": "aws-cdk-neptune-integ/VPC" + "value": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC" } ] } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "VPCGW": { "id": "VPCGW", - "path": "aws-cdk-neptune-integ/VPC/VPCGW", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/VPC/VPCGW", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::VPCGatewayAttachment", "aws:cdk:cloudformation:props": { @@ -641,27 +641,27 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DatabaseCopyTagsToSnapshotDisabled": { "id": "DatabaseCopyTagsToSnapshotDisabled", - "path": "aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotDisabled", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/DatabaseCopyTagsToSnapshotDisabled", "children": { "Subnets": { "id": "Subnets", - "path": "aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotDisabled/Subnets", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/DatabaseCopyTagsToSnapshotDisabled/Subnets", "children": { "Resource": { "id": "Resource", - "path": "aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotDisabled/Subnets/Resource", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/DatabaseCopyTagsToSnapshotDisabled/Subnets/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Neptune::DBSubnetGroup", "aws:cdk:cloudformation:props": { @@ -677,23 +677,23 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_neptune.CfnDBSubnetGroup", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-neptune-alpha.SubnetGroup", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "SecurityGroup": { "id": "SecurityGroup", - "path": "aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotDisabled/SecurityGroup", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/DatabaseCopyTagsToSnapshotDisabled/SecurityGroup", "children": { "Resource": { "id": "Resource", - "path": "aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotDisabled/SecurityGroup/Resource", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/DatabaseCopyTagsToSnapshotDisabled/SecurityGroup/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", "aws:cdk:cloudformation:props": { @@ -711,19 +711,19 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Resource": { "id": "Resource", - "path": "aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotDisabled/Resource", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/DatabaseCopyTagsToSnapshotDisabled/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Neptune::DBCluster", "aws:cdk:cloudformation:props": { @@ -743,13 +743,13 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_neptune.CfnDBCluster", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Instance1": { "id": "Instance1", - "path": "aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotDisabled/Instance1", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/DatabaseCopyTagsToSnapshotDisabled/Instance1", "attributes": { "aws:cdk:cloudformation:type": "AWS::Neptune::DBInstance", "aws:cdk:cloudformation:props": { @@ -761,27 +761,27 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_neptune.CfnDBInstance", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-neptune-alpha.DatabaseCluster", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DatabaseCopyTagsToSnapshotEnabled": { "id": "DatabaseCopyTagsToSnapshotEnabled", - "path": "aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotEnabled", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/DatabaseCopyTagsToSnapshotEnabled", "children": { "Subnets": { "id": "Subnets", - "path": "aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotEnabled/Subnets", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/DatabaseCopyTagsToSnapshotEnabled/Subnets", "children": { "Resource": { "id": "Resource", - "path": "aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotEnabled/Subnets/Resource", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/DatabaseCopyTagsToSnapshotEnabled/Subnets/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Neptune::DBSubnetGroup", "aws:cdk:cloudformation:props": { @@ -797,23 +797,23 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_neptune.CfnDBSubnetGroup", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-neptune-alpha.SubnetGroup", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "SecurityGroup": { "id": "SecurityGroup", - "path": "aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotEnabled/SecurityGroup", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/DatabaseCopyTagsToSnapshotEnabled/SecurityGroup", "children": { "Resource": { "id": "Resource", - "path": "aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotEnabled/SecurityGroup/Resource", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/DatabaseCopyTagsToSnapshotEnabled/SecurityGroup/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", "aws:cdk:cloudformation:props": { @@ -831,19 +831,19 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Resource": { "id": "Resource", - "path": "aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotEnabled/Resource", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/DatabaseCopyTagsToSnapshotEnabled/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Neptune::DBCluster", "aws:cdk:cloudformation:props": { @@ -863,13 +863,13 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_neptune.CfnDBCluster", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Instance1": { "id": "Instance1", - "path": "aws-cdk-neptune-integ/DatabaseCopyTagsToSnapshotEnabled/Instance1", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/DatabaseCopyTagsToSnapshotEnabled/Instance1", "attributes": { "aws:cdk:cloudformation:type": "AWS::Neptune::DBInstance", "aws:cdk:cloudformation:props": { @@ -881,36 +881,36 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_neptune.CfnDBInstance", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-neptune-alpha.DatabaseCluster", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "BootstrapVersion": { "id": "BootstrapVersion", - "path": "aws-cdk-neptune-integ/BootstrapVersion", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/BootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", - "path": "aws-cdk-neptune-integ/CheckBootstrapVersion", + "path": "aws-cdk-neptune-integ-copy-tags-to-snapshot/CheckBootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnRule", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "ClusterTest": { @@ -937,22 +937,22 @@ "id": "BootstrapVersion", "path": "ClusterTest/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "ClusterTest/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnRule", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, @@ -977,8 +977,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.App", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.ts b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.ts index 53bc52b74aab3..298c9fdb2f23f 100644 --- a/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.ts +++ b/packages/@aws-cdk/aws-neptune-alpha/test/integ.cluster-copy-tags-to-snapshot.ts @@ -5,7 +5,7 @@ import { DatabaseCluster, InstanceType } from '../lib'; const app = new cdk.App(); -const stack = new cdk.Stack(app, 'aws-cdk-neptune-integ'); +const stack = new cdk.Stack(app, 'aws-cdk-neptune-integ-copy-tags-to-snapshot'); const vpc = new ec2.Vpc(stack, 'VPC', { maxAzs: 2, restrictDefaultSecurityGroup: false }); @@ -13,12 +13,14 @@ new DatabaseCluster(stack, 'DatabaseCopyTagsToSnapshotDisabled', { vpc, instanceType: InstanceType.R5_LARGE, copyTagsToSnapshot: false, + removalPolicy: cdk.RemovalPolicy.DESTROY, }); new DatabaseCluster(stack, 'DatabaseCopyTagsToSnapshotEnabled', { vpc, instanceType: InstanceType.R5_LARGE, copyTagsToSnapshot: true, + removalPolicy: cdk.RemovalPolicy.DESTROY, }); new integ.IntegTest(app, 'ClusterTest', { From e90374333d6b03a6f3d1899f9920f6f60966f9a3 Mon Sep 17 00:00:00 2001 From: maz Date: Wed, 15 May 2024 23:36:04 +0900 Subject: [PATCH 6/6] fix: update README --- packages/@aws-cdk/aws-neptune-alpha/README.md | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/packages/@aws-cdk/aws-neptune-alpha/README.md b/packages/@aws-cdk/aws-neptune-alpha/README.md index 9b7d247624de2..0b08391aa4a5a 100644 --- a/packages/@aws-cdk/aws-neptune-alpha/README.md +++ b/packages/@aws-cdk/aws-neptune-alpha/README.md @@ -25,13 +25,12 @@ import * as neptune from '@aws-cdk/aws-neptune-alpha'; ## Starting a Neptune Database -To set up a Neptune database, define a `DatabaseCluster`. You must always launch a database in a VPC. +To set up a Neptune database, define a `DatabaseCluster`. You must always launch a database in a VPC. ```ts const cluster = new neptune.DatabaseCluster(this, 'Database', { vpc, instanceType: neptune.InstanceType.R5_LARGE, - copyTagsToSnapshot: true // whether to save the cluster tags when creating the snapshot. }); ``` @@ -127,9 +126,9 @@ const replica1 = new neptune.DatabaseInstance(this, 'Instance', { ## Automatic minor version upgrades -By setting `autoMinorVersionUpgrade` to true, Neptune will automatically update -the engine of the entire cluster to the latest minor version after a stabilization -window of 2 to 3 weeks. +By setting `autoMinorVersionUpgrade` to true, Neptune will automatically update +the engine of the entire cluster to the latest minor version after a stabilization +window of 2 to 3 weeks. ```ts new neptune.DatabaseCluster(this, 'Cluster', { @@ -185,9 +184,21 @@ instance.metric('SparqlRequestsPerSec') // instance-level SparqlErrors metric For more details on the available metrics, refer to https://docs.aws.amazon.com/neptune/latest/userguide/cw-metrics.html +## Copy tags to snapshot + +By setting `copyTagsToSnapshot` to true, all tags of the cluster are copied to the snapshots when they are created. + +```ts +const cluster = new neptune.DatabaseCluster(this, 'Database', { + vpc, + instanceType: neptune.InstanceType.R5_LARGE, + copyTagsToSnapshot: true // whether to save the cluster tags when creating the snapshot. +}); +``` + ## Neptune Serverless -You can configure a Neptune Serverless cluster using the dedicated instance type along with the +You can configure a Neptune Serverless cluster using the dedicated instance type along with the `serverlessScalingConfiguration` property. > Visit [Using Amazon Neptune Serverless](https://docs.aws.amazon.com/neptune/latest/userguide/neptune-serverless-using.html) for more details.