From 8278e1cfe2e71060de585d162b65ed92d5dc628b Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Fri, 26 Apr 2024 20:52:03 +0900 Subject: [PATCH 01/15] feat: multi az --- packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts b/packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts index 34c45f0196a75..0b18d7c9089d4 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts +++ b/packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts @@ -385,6 +385,13 @@ export interface ClusterProps { * @default - false */ readonly enhancedVpcRouting?: boolean; + + /** + * Indicating whether Amazon Redshift should deploy the cluster in two Availability Zones. + * + * @default false + */ + readonly multiAz?: boolean; } /** @@ -586,6 +593,7 @@ export class Cluster extends ClusterBase { classic: props.classicResizing, elasticIp: props.elasticIp, enhancedVpcRouting: props.enhancedVpcRouting, + multiAz: props.multiAz, }); this.cluster.applyRemovalPolicy(removalPolicy, { From 97176b156eb48da8d36e0e5d3b7ac87c2111e7d2 Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Fri, 26 Apr 2024 22:33:59 +0900 Subject: [PATCH 02/15] test: add integ test --- .../aws-redshift-alpha/lib/cluster.ts | 13 +- .../aws-redshift-alpha/test/cluster.test.ts | 237 +++- ...-cdk-redshift-cluster-database.assets.json | 20 + ...dk-redshift-cluster-database.template.json | 745 +++++++++++ ...efaultTestDeployAssert27E37E1B.assets.json | 19 + ...aultTestDeployAssert27E37E1B.template.json | 36 + .../cdk.out | 1 + .../integ.json | 12 + .../manifest.json | 335 +++++ .../tree.json | 1183 +++++++++++++++++ .../test/integ.cluster-multi-az.ts | 42 + .../test/integ.cluster-temp.ts | 37 + 12 files changed, 2620 insertions(+), 60 deletions(-) create mode 100644 packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/aws-cdk-redshift-cluster-database.assets.json create mode 100644 packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/aws-cdk-redshift-cluster-database.template.json create mode 100644 packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B.assets.json create mode 100644 packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B.template.json create mode 100644 packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/cdk.out create mode 100644 packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/integ.json create mode 100644 packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/manifest.json create mode 100644 packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/tree.json create mode 100644 packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.ts create mode 100644 packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-temp.ts diff --git a/packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts b/packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts index 0b18d7c9089d4..6792ef447d28c 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts +++ b/packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts @@ -565,6 +565,17 @@ export class Cluster extends ClusterBase { ); } + const nodeType = props.nodeType || NodeType.DC2_LARGE; + + if (props.multiAz) { + if (!nodeType.startsWith('ra3')) { + throw new Error('Multi-AZ cluster is only supported for RA3 node types.'); + } + if (clusterType === ClusterType.SINGLE_NODE) { + throw new Error('Multi-AZ cluster is not supported for single-node clusters.'); + } + } + this.cluster = new CfnCluster(this, 'Resource', { // Basic allowVersionUpgrade: true, @@ -581,7 +592,7 @@ export class Cluster extends ClusterBase { ?? props.masterUser.masterPassword?.unsafeUnwrap() ?? 'default', preferredMaintenanceWindow: props.preferredMaintenanceWindow, - nodeType: props.nodeType || NodeType.DC2_LARGE, + nodeType, numberOfNodes: nodeCount, loggingProperties, iamRoles: Lazy.list({ produce: () => this.roles.map(role => role.roleArn) }, { omitEmpty: true }), diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/cluster.test.ts b/packages/@aws-cdk/aws-redshift-alpha/test/cluster.test.ts index f4b36af0fe82c..b7e7f94d63d76 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/cluster.test.ts +++ b/packages/@aws-cdk/aws-redshift-alpha/test/cluster.test.ts @@ -4,7 +4,13 @@ import * as iam from 'aws-cdk-lib/aws-iam'; import * as kms from 'aws-cdk-lib/aws-kms'; import * as s3 from 'aws-cdk-lib/aws-s3'; import * as cdk from 'aws-cdk-lib'; -import { Cluster, ClusterParameterGroup, ClusterSubnetGroup, ClusterType } from '../lib'; +import { + Cluster, + ClusterParameterGroup, + ClusterSubnetGroup, + ClusterType, + NodeType, +} from '../lib'; import { CfnCluster } from 'aws-cdk-lib/aws-redshift'; let stack: cdk.Stack; @@ -39,7 +45,9 @@ test('check that instantiation works', () => { DBName: 'default_db', PubliclyAccessible: false, ClusterSubnetGroupName: { Ref: 'RedshiftSubnetsDFE70E0A' }, - VpcSecurityGroupIds: [{ 'Fn::GetAtt': ['RedshiftSecurityGroup796D74A7', 'GroupId'] }], + VpcSecurityGroupIds: [ + { 'Fn::GetAtt': ['RedshiftSecurityGroup796D74A7', 'GroupId'] }, + ], }, DeletionPolicy: 'Retain', UpdateReplacePolicy: 'Retain', @@ -64,7 +72,11 @@ test('can create a cluster with imported vpc and security group', () => { vpc = ec2.Vpc.fromLookup(stack, 'ImportedVPC', { vpcId: 'VPC12345', }); - const sg = ec2.SecurityGroup.fromSecurityGroupId(stack, 'SG', 'SecurityGroupId12345'); + const sg = ec2.SecurityGroup.fromSecurityGroupId( + stack, + 'SG', + 'SecurityGroupId12345', + ); // WHEN new Cluster(stack, 'Redshift', { @@ -122,18 +134,20 @@ test('creates a secret when master credentials are not specified', () => { }, }); - Template.fromStack(stack).hasResourceProperties('AWS::SecretsManager::Secret', { - GenerateSecretString: { - ExcludeCharacters: '"@/\\\ \'', - GenerateStringKey: 'password', - PasswordLength: 30, - SecretStringTemplate: '{"username":"admin"}', + Template.fromStack(stack).hasResourceProperties( + 'AWS::SecretsManager::Secret', + { + GenerateSecretString: { + ExcludeCharacters: "\"@/\\ '", + GenerateStringKey: 'password', + PasswordLength: 30, + SecretStringTemplate: '{"username":"admin"}', + }, }, - }); + ); }); describe('node count', () => { - test('Single Node Clusters do not define node count', () => { // WHEN new Cluster(stack, 'Redshift', { @@ -179,7 +193,9 @@ describe('node count', () => { clusterType: ClusterType.SINGLE_NODE, numberOfNodes: 2, }); - }).toThrow(/Number of nodes must be not be supplied or be 1 for cluster type single-node/); + }).toThrow( + /Number of nodes must be not be supplied or be 1 for cluster type single-node/, + ); }); test('Multi-Node Clusters default to 2 nodes', () => { @@ -199,18 +215,23 @@ describe('node count', () => { }); }); - test.each([0, 1, -1, 101])('Multi-Node Clusters throw with %s nodes', (numberOfNodes: number) => { - expect(() => { - new Cluster(stack, 'Redshift', { - masterUser: { - masterUsername: 'admin', - }, - vpc, - clusterType: ClusterType.MULTI_NODE, - numberOfNodes, - }); - }).toThrow(/Number of nodes for cluster type multi-node must be at least 2 and no more than 100/); - }); + test.each([0, 1, -1, 101])( + 'Multi-Node Clusters throw with %s nodes', + (numberOfNodes: number) => { + expect(() => { + new Cluster(stack, 'Redshift', { + masterUser: { + masterUsername: 'admin', + }, + vpc, + clusterType: ClusterType.MULTI_NODE, + numberOfNodes, + }); + }).toThrow( + /Number of nodes for cluster type multi-node must be at least 2 and no more than 100/, + ); + }, + ); test('Multi-Node Clusters should allow input parameter for number of nodes', () => { // WHEN @@ -276,11 +297,9 @@ describe('parameter group', () => { Template.fromStack(stack).hasResourceProperties('AWS::Redshift::Cluster', { ClusterParameterGroupName: { Ref: 'ParamsA8366201' }, }); - }); test('Adding to the cluster parameter group on a cluster not instantiated with a parameter group', () => { - // WHEN const cluster = new Cluster(stack, 'Redshift', { clusterName: 'foobar', @@ -310,7 +329,6 @@ describe('parameter group', () => { }); test('Adding to the cluster parameter group on a cluster instantiated with a parameter group', () => { - // WHEN const group = new ClusterParameterGroup(stack, 'Params', { description: 'lorem ipsum', @@ -353,7 +371,11 @@ describe('parameter group', () => { // GIVEN const cluster = new Cluster(stack, 'Redshift', { clusterName: 'foobar', - parameterGroup: ClusterParameterGroup.fromClusterParameterGroupName(stack, 'Params', 'foo'), + parameterGroup: ClusterParameterGroup.fromClusterParameterGroupName( + stack, + 'Params', + 'foo', + ), masterUser: { masterUsername: 'admin', }, @@ -365,7 +387,6 @@ describe('parameter group', () => { // THEN .toThrowError('Cannot add a parameter to an imported parameter group'); }); - }); test('publicly accessible cluster', () => { @@ -401,9 +422,12 @@ test('imported cluster with imported security group honors allowAllOutbound', () cluster.connections.allowToAnyIpv4(ec2.Port.tcp(443)); // THEN - Template.fromStack(stack).hasResourceProperties('AWS::EC2::SecurityGroupEgress', { - GroupId: 'sg-123456789', - }); + Template.fromStack(stack).hasResourceProperties( + 'AWS::EC2::SecurityGroupEgress', + { + GroupId: 'sg-123456789', + }, + ); }); test('can create a cluster with logging enabled', () => { @@ -445,7 +469,6 @@ test('throws when trying to add rotation to a cluster without secret', () => { expect(() => { cluster.addRotationSingleUser(); }).toThrowError(); - }); test('throws validation error when trying to set encryptionKey without enabling encryption', () => { @@ -466,7 +489,6 @@ test('throws validation error when trying to set encryptionKey without enabling expect(() => { new Cluster(stack, 'Redshift', props); }).toThrowError(); - }); test('throws when trying to add single user rotation multiple times', () => { @@ -494,10 +516,17 @@ test('can use existing cluster subnet group', () => { masterUsername: 'admin', }, vpc, - subnetGroup: ClusterSubnetGroup.fromClusterSubnetGroupName(stack, 'Group', 'my-existing-cluster-subnet-group'), + subnetGroup: ClusterSubnetGroup.fromClusterSubnetGroupName( + stack, + 'Group', + 'my-existing-cluster-subnet-group', + ), }); - Template.fromStack(stack).resourceCountIs('AWS::Redshift::ClusterSubnetGroup', 0); + Template.fromStack(stack).resourceCountIs( + 'AWS::Redshift::ClusterSubnetGroup', + 0, + ); Template.fromStack(stack).hasResourceProperties('AWS::Redshift::Cluster', { ClusterSubnetGroupName: 'my-existing-cluster-subnet-group', }); @@ -542,7 +571,9 @@ test.each([ DBName: 'default_db', PubliclyAccessible: false, ClusterSubnetGroupName: { Ref: 'RedshiftSubnetsDFE70E0A' }, - VpcSecurityGroupIds: [{ 'Fn::GetAtt': ['RedshiftSecurityGroup796D74A7', 'GroupId'] }], + VpcSecurityGroupIds: [ + { 'Fn::GetAtt': ['RedshiftSecurityGroup796D74A7', 'GroupId'] }, + ], Classic: classicResizing, }, DeletionPolicy: 'Retain', @@ -574,7 +605,9 @@ test('resize type not set', () => { DBName: 'default_db', PubliclyAccessible: false, ClusterSubnetGroupName: { Ref: 'RedshiftSubnetsDFE70E0A' }, - VpcSecurityGroupIds: [{ 'Fn::GetAtt': ['RedshiftSecurityGroup796D74A7', 'GroupId'] }], + VpcSecurityGroupIds: [ + { 'Fn::GetAtt': ['RedshiftSecurityGroup796D74A7', 'GroupId'] }, + ], }, DeletionPolicy: 'Retain', UpdateReplacePolicy: 'Retain', @@ -606,7 +639,9 @@ test('elastic ip address', () => { DBName: 'default_db', PubliclyAccessible: false, ClusterSubnetGroupName: { Ref: 'RedshiftSubnetsDFE70E0A' }, - VpcSecurityGroupIds: [{ 'Fn::GetAtt': ['RedshiftSecurityGroup796D74A7', 'GroupId'] }], + VpcSecurityGroupIds: [ + { 'Fn::GetAtt': ['RedshiftSecurityGroup796D74A7', 'GroupId'] }, + ], ElasticIp: '1.3.3.7', }, DeletionPolicy: 'Retain', @@ -614,6 +649,66 @@ test('elastic ip address', () => { }); }); +describe('multi AZ cluster', () => { + test('create a multi AZ cluster', () => { + // WHEN + new Cluster(stack, 'Redshift', { + masterUser: { + masterUsername: 'admin', + }, + vpc, + nodeType: NodeType.RA3_XLPLUS, + multiAz: true, + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::Redshift::Cluster', { + AllowVersionUpgrade: true, + MasterUsername: 'admin', + MasterUserPassword: 'tooshort', + ClusterType: 'multi-node', + AutomatedSnapshotRetentionPeriod: 1, + Encrypted: true, + NumberOfNodes: 2, + NodeType: 'ra3.xlplus', + DBName: 'default_db', + PubliclyAccessible: false, + ClusterSubnetGroupName: { Ref: 'RedshiftSubnetsDFE70E0A' }, + VpcSecurityGroupIds: [ + { 'Fn::GetAtt': ['RedshiftSecurityGroup796D74A7', 'GroupId'] }, + ], + MultiAZ: true, + }); + }); + + test('throw error for invalid node type', () => { + expect(() => { + new Cluster(stack, 'Redshift', { + masterUser: { + masterUsername: 'admin', + }, + vpc, + nodeType: NodeType.DS2_XLARGE, + multiAz: true, + }); + }).toThrow('Multi-AZ cluster is only supported for RA3 node types.'); + }); + + test('throw error for single node cluster', () => { + expect(() => { + new Cluster(stack, 'Redshift', { + masterUser: { + masterUsername: 'admin', + }, + vpc, + nodeType: NodeType.RA3_XLPLUS, + multiAz: true, + clusterType: ClusterType.SINGLE_NODE, + }); + }).toThrow('Multi-AZ cluster is not supported for single-node clusters.'); + }); +}); + describe('reboot for Parameter Changes', () => { test('throw error for cluster without parameter group', () => { // Given @@ -637,7 +732,11 @@ describe('reboot for Parameter Changes', () => { masterUsername: 'admin', }, vpc, - parameterGroup: ClusterParameterGroup.fromClusterParameterGroupName(stack, 'foo', 'bar'), + parameterGroup: ClusterParameterGroup.fromClusterParameterGroupName( + stack, + 'foo', + 'bar', + ), }); cluster.enableRebootForParameterChanges(); // WHEN @@ -675,7 +774,10 @@ describe('reboot for Parameter Changes', () => { //WHEN cluster.enableRebootForParameterChanges(); // THEN - Template.fromStack(stack).resourceCountIs('Custom::RedshiftClusterRebooter', 1); + Template.fromStack(stack).resourceCountIs( + 'Custom::RedshiftClusterRebooter', + 1, + ); }); test('cluster with parameter group', () => { @@ -734,22 +836,23 @@ describe('reboot for Parameter Changes', () => { //THEN const template = Template.fromStack(stack); template.hasResourceProperties('Custom::RedshiftClusterRebooter', { - ParametersString: JSON.stringify( - { - foo: 'bar', - lorem: 'ipsum', - }, - ), + ParametersString: JSON.stringify({ + foo: 'bar', + lorem: 'ipsum', + }), }); }); }); describe('default IAM role', () => { - test('Default role not in role list', () => { // GIVEN - const clusterRole1 = new iam.Role(stack, 'clusterRole1', { assumedBy: new iam.ServicePrincipal('redshift.amazonaws.com') }); - const defaultRole1 = new iam.Role(stack, 'defaultRole1', { assumedBy: new iam.ServicePrincipal('redshift.amazonaws.com') }); + const clusterRole1 = new iam.Role(stack, 'clusterRole1', { + assumedBy: new iam.ServicePrincipal('redshift.amazonaws.com'), + }); + const defaultRole1 = new iam.Role(stack, 'defaultRole1', { + assumedBy: new iam.ServicePrincipal('redshift.amazonaws.com'), + }); expect(() => { new Cluster(stack, 'Redshift', { @@ -764,7 +867,9 @@ describe('default IAM role', () => { }); test('throws error when default role not attached to cluster when adding default role post creation', () => { - const defaultRole1 = new iam.Role(stack, 'defaultRole1', { assumedBy: new iam.ServicePrincipal('redshift.amazonaws.com') }); + const defaultRole1 = new iam.Role(stack, 'defaultRole1', { + assumedBy: new iam.ServicePrincipal('redshift.amazonaws.com'), + }); const cluster = new Cluster(stack, 'Redshift', { masterUser: { masterUsername: 'admin', @@ -774,7 +879,9 @@ describe('default IAM role', () => { expect(() => { cluster.addDefaultIamRole(defaultRole1); - }).toThrow(/Default role must be associated to the Redshift cluster to be set as the default role./); + }).toThrow( + /Default role must be associated to the Redshift cluster to be set as the default role./, + ); }); }); @@ -836,7 +943,9 @@ describe('IAM role', () => { vpc, }); - const newTestStack = new cdk.Stack(stack, 'NewTestStack', { env: { account: stack.account, region: stack.region } }); + const newTestStack = new cdk.Stack(stack, 'NewTestStack', { + env: { account: stack.account, region: stack.region }, + }); const role = new iam.Role(newTestStack, 'Role', { assumedBy: new iam.ServicePrincipal('redshift.amazonaws.com'), }); @@ -848,7 +957,11 @@ describe('IAM role', () => { Template.fromStack(stack).hasResource('AWS::Redshift::Cluster', { Properties: { IamRoles: Match.arrayEquals([ - { 'Fn::ImportValue': Match.stringLikeRegexp('NewTestStack:ExportsOutputFnGetAttRole*') }, + { + 'Fn::ImportValue': Match.stringLikeRegexp( + 'NewTestStack:ExportsOutputFnGetAttRole*', + ), + }, ]), }, }); @@ -867,16 +980,22 @@ describe('IAM role', () => { roles: [role], }); - expect(() => - // WHEN - cluster.addIamRole(role), + expect( + () => + // WHEN + cluster.addIamRole(role), // THEN ).toThrow(`Role '${role.roleArn}' is already attached to the cluster`); }); }); function testStack() { - const newTestStack = new cdk.Stack(undefined, undefined, { env: { account: '12345', region: 'us-test-1' } }); - newTestStack.node.setContext('availability-zones:12345:us-test-1', ['us-test-1a', 'us-test-1b']); + const newTestStack = new cdk.Stack(undefined, undefined, { + env: { account: '12345', region: 'us-test-1' }, + }); + newTestStack.node.setContext('availability-zones:12345:us-test-1', [ + 'us-test-1a', + 'us-test-1b', + ]); return newTestStack; } diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/aws-cdk-redshift-cluster-database.assets.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/aws-cdk-redshift-cluster-database.assets.json new file mode 100644 index 0000000000000..2ad3496831dfd --- /dev/null +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/aws-cdk-redshift-cluster-database.assets.json @@ -0,0 +1,20 @@ +{ + "version": "36.0.0", + "files": { + "72b490317d843a0b349a9606d3196494e09ee685325d9c419033f2f302bd9765": { + "source": { + "path": "aws-cdk-redshift-cluster-database.template.json", + "packaging": "file" + }, + "destinations": { + "214794239830-us-east-1": { + "bucketName": "cdk-hnb659fds-assets-214794239830-us-east-1", + "objectKey": "72b490317d843a0b349a9606d3196494e09ee685325d9c419033f2f302bd9765.json", + "region": "us-east-1", + "assumeRoleArn": "arn:${AWS::Partition}:iam::214794239830:role/cdk-hnb659fds-file-publishing-role-214794239830-us-east-1" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/aws-cdk-redshift-cluster-database.template.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/aws-cdk-redshift-cluster-database.template.json new file mode 100644 index 0000000000000..834bd6495cb93 --- /dev/null +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/aws-cdk-redshift-cluster-database.template.json @@ -0,0 +1,745 @@ +{ + "Resources": { + "Vpc8378EB38": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-database/Vpc" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPublicSubnet1Subnet5C2D37C4": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": "us-east-1a", + "CidrBlock": "10.0.0.0/19", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPublicSubnet1RouteTable6C95E38E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPublicSubnet1RouteTableAssociation97140677": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPublicSubnet1DefaultRoute3DA9E72A": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPublicSubnet1EIPD7E02669": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPublicSubnet1NATGateway4D7517AA": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet1EIPD7E02669", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1" + } + ] + }, + "DependsOn": [ + "VpcPublicSubnet1DefaultRoute3DA9E72A", + "VpcPublicSubnet1RouteTableAssociation97140677" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPublicSubnet2Subnet691E08A3": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": "us-east-1b", + "CidrBlock": "10.0.32.0/19", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPublicSubnet2RouteTable94F7E489": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPublicSubnet2RouteTableAssociationDD5762D8": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPublicSubnet2DefaultRoute97F91067": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPublicSubnet2EIP3C605A87": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPublicSubnet2NATGateway9182C01D": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet2EIP3C605A87", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2" + } + ] + }, + "DependsOn": [ + "VpcPublicSubnet2DefaultRoute97F91067", + "VpcPublicSubnet2RouteTableAssociationDD5762D8" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPublicSubnet3SubnetBE12F0B6": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": "us-east-1c", + "CidrBlock": "10.0.64.0/19", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPublicSubnet3RouteTable93458DBB": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPublicSubnet3RouteTableAssociation1F1EDF02": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet3RouteTable93458DBB" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet3SubnetBE12F0B6" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPublicSubnet3DefaultRoute4697774F": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "RouteTableId": { + "Ref": "VpcPublicSubnet3RouteTable93458DBB" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPublicSubnet3EIP3A666A23": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPublicSubnet3NATGateway7640CD1D": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet3EIP3A666A23", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VpcPublicSubnet3SubnetBE12F0B6" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3" + } + ] + }, + "DependsOn": [ + "VpcPublicSubnet3DefaultRoute4697774F", + "VpcPublicSubnet3RouteTableAssociation1F1EDF02" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPrivateSubnet1Subnet536B997A": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": "us-east-1a", + "CidrBlock": "10.0.96.0/19", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPrivateSubnet1RouteTableB2C5B500": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPrivateSubnet1DefaultRouteBE02A9ED": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + }, + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPrivateSubnet2Subnet3788AAA1": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": "us-east-1b", + "CidrBlock": "10.0.128.0/19", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPrivateSubnet2RouteTableA678073B": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPrivateSubnet2DefaultRoute060D2087": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet2NATGateway9182C01D" + }, + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPrivateSubnet3SubnetF258B56E": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": "us-east-1c", + "CidrBlock": "10.0.160.0/19", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPrivateSubnet3RouteTableD98824C7": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPrivateSubnet3RouteTableAssociation16BDDC43": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet3RouteTableD98824C7" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet3SubnetF258B56E" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcPrivateSubnet3DefaultRoute94B74F0D": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet3NATGateway7640CD1D" + }, + "RouteTableId": { + "Ref": "VpcPrivateSubnet3RouteTableD98824C7" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcIGWD7BA715C": { + "Type": "AWS::EC2::InternetGateway", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-database/Vpc" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcVPCGWBF912B6E": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "InternetGatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "VpcId": { + "Ref": "Vpc8378EB38" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterSubnetsDCFA5CB7": { + "Type": "AWS::Redshift::ClusterSubnetGroup", + "Properties": { + "Description": "Subnets for Cluster Redshift cluster", + "SubnetIds": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + }, + { + "Ref": "VpcPrivateSubnet3SubnetF258B56E" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterSecurityGroup0921994B": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "Redshift security group", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterSecret6368BD0F": { + "Type": "AWS::SecretsManager::Secret", + "Properties": { + "GenerateSecretString": { + "ExcludeCharacters": "\"@/\\ '", + "GenerateStringKey": "password", + "PasswordLength": 30, + "SecretStringTemplate": "{\"username\":\"admin\"}" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterSecretAttachment769E6258": { + "Type": "AWS::SecretsManager::SecretTargetAttachment", + "Properties": { + "SecretId": { + "Ref": "ClusterSecret6368BD0F" + }, + "TargetId": { + "Ref": "ClusterEB0386A7" + }, + "TargetType": "AWS::Redshift::Cluster" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterEB0386A7": { + "Type": "AWS::Redshift::Cluster", + "Properties": { + "AllowVersionUpgrade": true, + "AutomatedSnapshotRetentionPeriod": 1, + "ClusterSubnetGroupName": { + "Ref": "ClusterSubnetsDCFA5CB7" + }, + "ClusterType": "multi-node", + "DBName": "default_db", + "Encrypted": true, + "MasterUserPassword": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "ClusterSecret6368BD0F" + }, + ":SecretString:password::}}" + ] + ] + }, + "MasterUsername": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "ClusterSecret6368BD0F" + }, + ":SecretString:username::}}" + ] + ] + }, + "MultiAZ": true, + "NodeType": "ra3.xlplus", + "NumberOfNodes": 2, + "PubliclyAccessible": false, + "VpcSecurityGroupIds": [ + { + "Fn::GetAtt": [ + "ClusterSecurityGroup0921994B", + "GroupId" + ] + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + } + }, + "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-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B.assets.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B.assets.json new file mode 100644 index 0000000000000..d338dc103b6a6 --- /dev/null +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B.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-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B.template.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B.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-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/cdk.out b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/cdk.out new file mode 100644 index 0000000000000..1f0068d32659a --- /dev/null +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"36.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/integ.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/integ.json new file mode 100644 index 0000000000000..f302134300721 --- /dev/null +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "36.0.0", + "testCases": { + "aws-cdk-redshift-multi-az/DefaultTest": { + "stacks": [ + "aws-cdk-redshift-cluster-database" + ], + "assertionStack": "aws-cdk-redshift-multi-az/DefaultTest/DeployAssert", + "assertionStackName": "awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/manifest.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/manifest.json new file mode 100644 index 0000000000000..07ae36365eba6 --- /dev/null +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/manifest.json @@ -0,0 +1,335 @@ +{ + "version": "36.0.0", + "artifacts": { + "aws-cdk-redshift-cluster-database.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-cdk-redshift-cluster-database.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-cdk-redshift-cluster-database": { + "type": "aws:cloudformation:stack", + "environment": "aws://214794239830/us-east-1", + "properties": { + "templateFile": "aws-cdk-redshift-cluster-database.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::214794239830:role/cdk-hnb659fds-deploy-role-214794239830-us-east-1", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::214794239830:role/cdk-hnb659fds-cfn-exec-role-214794239830-us-east-1", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-214794239830-us-east-1/72b490317d843a0b349a9606d3196494e09ee685325d9c419033f2f302bd9765.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-cdk-redshift-cluster-database.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::214794239830:role/cdk-hnb659fds-lookup-role-214794239830-us-east-1", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "aws-cdk-redshift-cluster-database.assets" + ], + "metadata": { + "/aws-cdk-redshift-cluster-database/Vpc/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Vpc8378EB38" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1Subnet5C2D37C4" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1RouteTable6C95E38E" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1RouteTableAssociation97140677" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1DefaultRoute3DA9E72A" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1EIPD7E02669" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1NATGateway4D7517AA" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2Subnet691E08A3" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2RouteTable94F7E489" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2RouteTableAssociationDD5762D8" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2DefaultRoute97F91067" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2EIP3C605A87" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2NATGateway9182C01D" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet3SubnetBE12F0B6" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet3RouteTable93458DBB" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet3RouteTableAssociation1F1EDF02" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet3DefaultRoute4697774F" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet3EIP3A666A23" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet3NATGateway7640CD1D" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1Subnet536B997A" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1RouteTableB2C5B500" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1RouteTableAssociation70C59FA6" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1DefaultRouteBE02A9ED" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2Subnet3788AAA1" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2RouteTableA678073B" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2RouteTableAssociationA89CAD56" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2DefaultRoute060D2087" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet3SubnetF258B56E" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet3RouteTableD98824C7" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet3RouteTableAssociation16BDDC43" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet3DefaultRoute94B74F0D" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/IGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcIGWD7BA715C" + } + ], + "/aws-cdk-redshift-cluster-database/Vpc/VPCGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcVPCGWBF912B6E" + } + ], + "/aws-cdk-redshift-cluster-database/Cluster/Subnets/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterSubnetsDCFA5CB7" + } + ], + "/aws-cdk-redshift-cluster-database/Cluster/SecurityGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterSecurityGroup0921994B" + } + ], + "/aws-cdk-redshift-cluster-database/Cluster/Secret/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterSecret6368BD0F" + } + ], + "/aws-cdk-redshift-cluster-database/Cluster/Secret/Attachment/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterSecretAttachment769E6258" + } + ], + "/aws-cdk-redshift-cluster-database/Cluster/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterEB0386A7" + } + ], + "/aws-cdk-redshift-cluster-database/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-cdk-redshift-cluster-database/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-cdk-redshift-cluster-database" + }, + "awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B.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": [ + "awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B.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": [ + "awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B.assets" + ], + "metadata": { + "/aws-cdk-redshift-multi-az/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-cdk-redshift-multi-az/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-cdk-redshift-multi-az/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/tree.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/tree.json new file mode 100644 index 0000000000000..2c3555daf4c4f --- /dev/null +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/tree.json @@ -0,0 +1,1183 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "aws-cdk-redshift-cluster-database": { + "id": "aws-cdk-redshift-cluster-database", + "path": "aws-cdk-redshift-cluster-database", + "children": { + "Vpc": { + "id": "Vpc", + "path": "aws-cdk-redshift-cluster-database/Vpc", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-database/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-redshift-cluster-database/Vpc" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" + } + }, + "PublicSubnet1": { + "id": "PublicSubnet1", + "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": "us-east-1a", + "cidrBlock": "10.0.0.0/19", + "mapPublicIpOnLaunch": true, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Public" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Public" + }, + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "subnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "gatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "routeTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + }, + "EIP": { + "id": "EIP", + "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1/NATGateway", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", + "aws:cdk:cloudformation:props": { + "allocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet1EIPD7E02669", + "AllocationId" + ] + }, + "subnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, + "tags": [ + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-database/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-redshift-cluster-database/Vpc/PublicSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": "us-east-1b", + "cidrBlock": "10.0.32.0/19", + "mapPublicIpOnLaunch": true, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Public" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Public" + }, + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "subnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "gatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "routeTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + }, + "EIP": { + "id": "EIP", + "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2/NATGateway", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", + "aws:cdk:cloudformation:props": { + "allocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet2EIP3C605A87", + "AllocationId" + ] + }, + "subnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + }, + "tags": [ + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-database/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" + } + }, + "PublicSubnet3": { + "id": "PublicSubnet3", + "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": "us-east-1c", + "cidrBlock": "10.0.64.0/19", + "mapPublicIpOnLaunch": true, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Public" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Public" + }, + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPublicSubnet3RouteTable93458DBB" + }, + "subnetId": { + "Ref": "VpcPublicSubnet3SubnetBE12F0B6" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "gatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "routeTableId": { + "Ref": "VpcPublicSubnet3RouteTable93458DBB" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + }, + "EIP": { + "id": "EIP", + "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3/NATGateway", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", + "aws:cdk:cloudformation:props": { + "allocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet3EIP3A666A23", + "AllocationId" + ] + }, + "subnetId": { + "Ref": "VpcPublicSubnet3SubnetBE12F0B6" + }, + "tags": [ + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3" + } + ] + } + }, + "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-redshift-cluster-database/Vpc/PrivateSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": "us-east-1a", + "cidrBlock": "10.0.96.0/19", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Private" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Private" + }, + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "subnetId": { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "natGatewayId": { + "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + }, + "routeTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + } + } + }, + "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-redshift-cluster-database/Vpc/PrivateSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": "us-east-1b", + "cidrBlock": "10.0.128.0/19", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Private" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Private" + }, + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "subnetId": { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "natGatewayId": { + "Ref": "VpcPublicSubnet2NATGateway9182C01D" + }, + "routeTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "PrivateSubnet3": { + "id": "PrivateSubnet3", + "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": "us-east-1c", + "cidrBlock": "10.0.160.0/19", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Private" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Private" + }, + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPrivateSubnet3RouteTableD98824C7" + }, + "subnetId": { + "Ref": "VpcPrivateSubnet3SubnetF258B56E" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "natGatewayId": { + "Ref": "VpcPublicSubnet3NATGateway7640CD1D" + }, + "routeTableId": { + "Ref": "VpcPrivateSubnet3RouteTableD98824C7" + } + } + }, + "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-redshift-cluster-database/Vpc/IGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::InternetGateway", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-database/Vpc" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" + } + }, + "VPCGW": { + "id": "VPCGW", + "path": "aws-cdk-redshift-cluster-database/Vpc/VPCGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::VPCGatewayAttachment", + "aws:cdk:cloudformation:props": { + "internetGatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0" + } + }, + "Cluster": { + "id": "Cluster", + "path": "aws-cdk-redshift-cluster-database/Cluster", + "children": { + "Subnets": { + "id": "Subnets", + "path": "aws-cdk-redshift-cluster-database/Cluster/Subnets", + "children": { + "Default": { + "id": "Default", + "path": "aws-cdk-redshift-cluster-database/Cluster/Subnets/Default", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Redshift::ClusterSubnetGroup", + "aws:cdk:cloudformation:props": { + "description": "Subnets for Cluster Redshift cluster", + "subnetIds": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + }, + { + "Ref": "VpcPrivateSubnet3SubnetF258B56E" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_redshift.CfnClusterSubnetGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift-alpha.ClusterSubnetGroup", + "version": "0.0.0" + } + }, + "SecurityGroup": { + "id": "SecurityGroup", + "path": "aws-cdk-redshift-cluster-database/Cluster/SecurityGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-database/Cluster/SecurityGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", + "aws:cdk:cloudformation:props": { + "groupDescription": "Redshift security group", + "securityGroupEgress": [ + { + "cidrIp": "0.0.0.0/0", + "description": "Allow all outbound traffic by default", + "ipProtocol": "-1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" + } + }, + "Secret": { + "id": "Secret", + "path": "aws-cdk-redshift-cluster-database/Cluster/Secret", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-database/Cluster/Secret/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SecretsManager::Secret", + "aws:cdk:cloudformation:props": { + "generateSecretString": { + "passwordLength": 30, + "secretStringTemplate": "{\"username\":\"admin\"}", + "generateStringKey": "password", + "excludeCharacters": "\"@/\\ '" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_secretsmanager.CfnSecret", + "version": "0.0.0" + } + }, + "Attachment": { + "id": "Attachment", + "path": "aws-cdk-redshift-cluster-database/Cluster/Secret/Attachment", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-database/Cluster/Secret/Attachment/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SecretsManager::SecretTargetAttachment", + "aws:cdk:cloudformation:props": { + "secretId": { + "Ref": "ClusterSecret6368BD0F" + }, + "targetId": { + "Ref": "ClusterEB0386A7" + }, + "targetType": "AWS::Redshift::Cluster" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_secretsmanager.CfnSecretTargetAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_secretsmanager.SecretTargetAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift-alpha.DatabaseSecret", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-database/Cluster/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Redshift::Cluster", + "aws:cdk:cloudformation:props": { + "allowVersionUpgrade": true, + "automatedSnapshotRetentionPeriod": 1, + "clusterSubnetGroupName": { + "Ref": "ClusterSubnetsDCFA5CB7" + }, + "clusterType": "multi-node", + "dbName": "default_db", + "encrypted": true, + "masterUsername": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "ClusterSecret6368BD0F" + }, + ":SecretString:username::}}" + ] + ] + }, + "masterUserPassword": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "ClusterSecret6368BD0F" + }, + ":SecretString:password::}}" + ] + ] + }, + "multiAz": true, + "nodeType": "ra3.xlplus", + "numberOfNodes": 2, + "publiclyAccessible": false, + "vpcSecurityGroupIds": [ + { + "Fn::GetAtt": [ + "ClusterSecurityGroup0921994B", + "GroupId" + ] + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_redshift.CfnCluster", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift-alpha.Cluster", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-cdk-redshift-cluster-database/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-cdk-redshift-cluster-database/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "aws-cdk-redshift-multi-az": { + "id": "aws-cdk-redshift-multi-az", + "path": "aws-cdk-redshift-multi-az", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "aws-cdk-redshift-multi-az/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "aws-cdk-redshift-multi-az/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "aws-cdk-redshift-multi-az/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-cdk-redshift-multi-az/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-cdk-redshift-multi-az/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-redshift-alpha/test/integ.cluster-multi-az.ts b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.ts new file mode 100644 index 0000000000000..7356e836b5292 --- /dev/null +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.ts @@ -0,0 +1,42 @@ +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 * as constructs from 'constructs'; +import * as redshift from '../lib'; + +const app = new cdk.App(); +const stack = new cdk.Stack(app, 'aws-cdk-redshift-cluster-database', { + // Specify account and region to create 3 AZs + env: { + account: process.env.CDK_DEFAULT_ACCOUNT, + region: 'us-east-1', + }, +}); + +cdk.Aspects.of(stack).add({ + visit(node: constructs.IConstruct) { + if (cdk.CfnResource.isCfnResource(node)) { + node.applyRemovalPolicy(cdk.RemovalPolicy.DESTROY); + } + }, +}); + +const vpc = new ec2.Vpc(stack, 'Vpc', { + restrictDefaultSecurityGroup: false, + enableDnsHostnames: true, + enableDnsSupport: true, + maxAzs: 3, +}); + +new redshift.Cluster(stack, 'Cluster', { + vpc: vpc, + masterUser: { + masterUsername: 'admin', + }, + nodeType: redshift.NodeType.RA3_XLPLUS, + multiAz: true, +}); + +new integ.IntegTest(app, 'aws-cdk-redshift-multi-az', { + testCases: [stack], +}); diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-temp.ts b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-temp.ts new file mode 100644 index 0000000000000..bf68016a99a44 --- /dev/null +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-temp.ts @@ -0,0 +1,37 @@ +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 * as constructs from 'constructs'; +import * as redshift from '../lib'; + +const app = new cdk.App(); +const stack = new cdk.Stack(app, 'aws-cdk-redshift-cluster-database'); + +cdk.Aspects.of(stack).add({ + visit(node: constructs.IConstruct) { + if (cdk.CfnResource.isCfnResource(node)) { + node.applyRemovalPolicy(cdk.RemovalPolicy.DESTROY); + } + }, +}); + +const vpc = new ec2.Vpc(stack, 'Vpc', { + restrictDefaultSecurityGroup: false, + enableDnsHostnames: true, + enableDnsSupport: true, + maxAzs: 2, +}); + +new redshift.Cluster(stack, 'Cluster', { + vpc: vpc, + masterUser: { + masterUsername: 'admin', + }, + nodeType: redshift.NodeType.RA3_16XLARGE, + multiAz: true, + numberOfNodes: 1, +}); + +new integ.IntegTest(app, 'aws-cdk-redshift-multi-az', { + testCases: [stack], +}); From d7ba12e8b071e11708208991b41a303c87adeb85 Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Fri, 26 Apr 2024 22:38:38 +0900 Subject: [PATCH 03/15] fix: remove unnecessary integ test --- .../aws-redshift-alpha/test/cluster.test.ts | 1 + .../test/integ.cluster-multi-az.ts | 1 + .../test/integ.cluster-temp.ts | 37 ------------------- 3 files changed, 2 insertions(+), 37 deletions(-) delete mode 100644 packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-temp.ts diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/cluster.test.ts b/packages/@aws-cdk/aws-redshift-alpha/test/cluster.test.ts index b7e7f94d63d76..34a70eceeb00e 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/cluster.test.ts +++ b/packages/@aws-cdk/aws-redshift-alpha/test/cluster.test.ts @@ -655,6 +655,7 @@ describe('multi AZ cluster', () => { new Cluster(stack, 'Redshift', { masterUser: { masterUsername: 'admin', + masterPassword: cdk.SecretValue.unsafePlainText('tooshort'), }, vpc, nodeType: NodeType.RA3_XLPLUS, diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.ts b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.ts index 7356e836b5292..0d013b211a008 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.ts +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.ts @@ -34,6 +34,7 @@ new redshift.Cluster(stack, 'Cluster', { masterUsername: 'admin', }, nodeType: redshift.NodeType.RA3_XLPLUS, + multiAz: true, }); diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-temp.ts b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-temp.ts deleted file mode 100644 index bf68016a99a44..0000000000000 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-temp.ts +++ /dev/null @@ -1,37 +0,0 @@ -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 * as constructs from 'constructs'; -import * as redshift from '../lib'; - -const app = new cdk.App(); -const stack = new cdk.Stack(app, 'aws-cdk-redshift-cluster-database'); - -cdk.Aspects.of(stack).add({ - visit(node: constructs.IConstruct) { - if (cdk.CfnResource.isCfnResource(node)) { - node.applyRemovalPolicy(cdk.RemovalPolicy.DESTROY); - } - }, -}); - -const vpc = new ec2.Vpc(stack, 'Vpc', { - restrictDefaultSecurityGroup: false, - enableDnsHostnames: true, - enableDnsSupport: true, - maxAzs: 2, -}); - -new redshift.Cluster(stack, 'Cluster', { - vpc: vpc, - masterUser: { - masterUsername: 'admin', - }, - nodeType: redshift.NodeType.RA3_16XLARGE, - multiAz: true, - numberOfNodes: 1, -}); - -new integ.IntegTest(app, 'aws-cdk-redshift-multi-az', { - testCases: [stack], -}); From 804b9ff248867e3223254ffbd799d70eeeb0fb24 Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Fri, 26 Apr 2024 22:39:11 +0900 Subject: [PATCH 04/15] chore: remove line feed --- .../@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.ts b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.ts index 0d013b211a008..7356e836b5292 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.ts +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.ts @@ -34,7 +34,6 @@ new redshift.Cluster(stack, 'Cluster', { masterUsername: 'admin', }, nodeType: redshift.NodeType.RA3_XLPLUS, - multiAz: true, }); From 9826834d5d0bb53e931e428fe2e6c46abf2b8073 Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Fri, 26 Apr 2024 23:04:21 +0900 Subject: [PATCH 05/15] docs: update readme --- packages/@aws-cdk/aws-redshift-alpha/README.md | 17 +++++++++++++++++ .../test/integ.cluster-multi-az.ts | 4 +++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-redshift-alpha/README.md b/packages/@aws-cdk/aws-redshift-alpha/README.md index 3a5b8dbf2ee4b..ca7a2ed2c8571 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/README.md +++ b/packages/@aws-cdk/aws-redshift-alpha/README.md @@ -556,6 +556,23 @@ const cluster = new Cluster(this, 'Redshift', { cluster.addIamRole(role); ``` +## [Multi-AZ](https://docs.aws.amazon.com/redshift/latest/mgmt/managing-cluster-multi-az.html) + +Amazon Redshift supports multiple Availability Zones (Multi-AZ) deployments for provisioned RA3 clusters. By using Multi-AZ deployments, your Amazon Redshift data warehouse can continue operating in failure scenarios when an unexpected event happens in an Availability Zone. + +```ts +new redshift.Cluster(stack, 'Cluster', { + masterUser: { + masterUsername: 'admin', + }, + vpc, // 3 AZs are required for Multi-AZ + nodeType: redshift.NodeType.RA3_XLPLUS, // must be RA3 node type + clusterType: redshift.ClusterType.MULTI_NODE, // must be MULTI_NODE + numberOfNodes: 2, // must be 2 or more + multiAz: true, +}); +``` + ## Resizing As your data warehousing needs change, it's possible to resize your Redshift cluster. If the cluster was deployed via CDK, diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.ts b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.ts index 7356e836b5292..a0368c8e69f0b 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.ts +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.ts @@ -29,11 +29,13 @@ const vpc = new ec2.Vpc(stack, 'Vpc', { }); new redshift.Cluster(stack, 'Cluster', { - vpc: vpc, + vpc, masterUser: { masterUsername: 'admin', }, nodeType: redshift.NodeType.RA3_XLPLUS, + clusterType: redshift.ClusterType.MULTI_NODE, + numberOfNodes: 2, multiAz: true, }); From 7720ac98dc0193e25262969fe288920ccbb422a8 Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Fri, 26 Apr 2024 23:07:00 +0900 Subject: [PATCH 06/15] fix: stack account --- .../@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.ts b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.ts index a0368c8e69f0b..9b9dbd4e5bc3d 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.ts +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.ts @@ -8,7 +8,7 @@ const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-cdk-redshift-cluster-database', { // Specify account and region to create 3 AZs env: { - account: process.env.CDK_DEFAULT_ACCOUNT, + account: '123456789012', region: 'us-east-1', }, }); From 6d7629b20636770ea4518a146cff81722caa1f08 Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Mon, 29 Apr 2024 00:25:37 +0900 Subject: [PATCH 07/15] fix: integ test --- .../aws-redshift-alpha/test/integ.cluster-multi-az.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.ts b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.ts index 9b9dbd4e5bc3d..f6f5aad771bc1 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.ts +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.ts @@ -4,9 +4,12 @@ import * as integ from '@aws-cdk/integ-tests-alpha'; import * as constructs from 'constructs'; import * as redshift from '../lib'; -const app = new cdk.App(); +const app = new cdk.App({ + context: { + 'availability-zones:account=123456789012:region=us-east-1': ['us-east-1a', 'us-east-1b', 'us-east-1c'], + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-redshift-cluster-database', { - // Specify account and region to create 3 AZs env: { account: '123456789012', region: 'us-east-1', From 1afd15c57a958d820ebc2fe2b4536d52fbb9b202 Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Mon, 29 Apr 2024 11:08:56 +0900 Subject: [PATCH 08/15] chore: refactor unit test --- .../aws-redshift-alpha/test/cluster.test.ts | 177 ++++++------------ 1 file changed, 59 insertions(+), 118 deletions(-) diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/cluster.test.ts b/packages/@aws-cdk/aws-redshift-alpha/test/cluster.test.ts index 34a70eceeb00e..cd4496815bae1 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/cluster.test.ts +++ b/packages/@aws-cdk/aws-redshift-alpha/test/cluster.test.ts @@ -4,13 +4,7 @@ import * as iam from 'aws-cdk-lib/aws-iam'; import * as kms from 'aws-cdk-lib/aws-kms'; import * as s3 from 'aws-cdk-lib/aws-s3'; import * as cdk from 'aws-cdk-lib'; -import { - Cluster, - ClusterParameterGroup, - ClusterSubnetGroup, - ClusterType, - NodeType, -} from '../lib'; +import { Cluster, ClusterParameterGroup, ClusterSubnetGroup, ClusterType, NodeType } from '../lib'; import { CfnCluster } from 'aws-cdk-lib/aws-redshift'; let stack: cdk.Stack; @@ -45,9 +39,7 @@ test('check that instantiation works', () => { DBName: 'default_db', PubliclyAccessible: false, ClusterSubnetGroupName: { Ref: 'RedshiftSubnetsDFE70E0A' }, - VpcSecurityGroupIds: [ - { 'Fn::GetAtt': ['RedshiftSecurityGroup796D74A7', 'GroupId'] }, - ], + VpcSecurityGroupIds: [{ 'Fn::GetAtt': ['RedshiftSecurityGroup796D74A7', 'GroupId'] }], }, DeletionPolicy: 'Retain', UpdateReplacePolicy: 'Retain', @@ -72,11 +64,7 @@ test('can create a cluster with imported vpc and security group', () => { vpc = ec2.Vpc.fromLookup(stack, 'ImportedVPC', { vpcId: 'VPC12345', }); - const sg = ec2.SecurityGroup.fromSecurityGroupId( - stack, - 'SG', - 'SecurityGroupId12345', - ); + const sg = ec2.SecurityGroup.fromSecurityGroupId(stack, 'SG', 'SecurityGroupId12345'); // WHEN new Cluster(stack, 'Redshift', { @@ -134,20 +122,18 @@ test('creates a secret when master credentials are not specified', () => { }, }); - Template.fromStack(stack).hasResourceProperties( - 'AWS::SecretsManager::Secret', - { - GenerateSecretString: { - ExcludeCharacters: "\"@/\\ '", - GenerateStringKey: 'password', - PasswordLength: 30, - SecretStringTemplate: '{"username":"admin"}', - }, + Template.fromStack(stack).hasResourceProperties('AWS::SecretsManager::Secret', { + GenerateSecretString: { + ExcludeCharacters: '"@/\\\ \'', + GenerateStringKey: 'password', + PasswordLength: 30, + SecretStringTemplate: '{"username":"admin"}', }, - ); + }); }); describe('node count', () => { + test('Single Node Clusters do not define node count', () => { // WHEN new Cluster(stack, 'Redshift', { @@ -193,9 +179,7 @@ describe('node count', () => { clusterType: ClusterType.SINGLE_NODE, numberOfNodes: 2, }); - }).toThrow( - /Number of nodes must be not be supplied or be 1 for cluster type single-node/, - ); + }).toThrow(/Number of nodes must be not be supplied or be 1 for cluster type single-node/); }); test('Multi-Node Clusters default to 2 nodes', () => { @@ -215,23 +199,18 @@ describe('node count', () => { }); }); - test.each([0, 1, -1, 101])( - 'Multi-Node Clusters throw with %s nodes', - (numberOfNodes: number) => { - expect(() => { - new Cluster(stack, 'Redshift', { - masterUser: { - masterUsername: 'admin', - }, - vpc, - clusterType: ClusterType.MULTI_NODE, - numberOfNodes, - }); - }).toThrow( - /Number of nodes for cluster type multi-node must be at least 2 and no more than 100/, - ); - }, - ); + test.each([0, 1, -1, 101])('Multi-Node Clusters throw with %s nodes', (numberOfNodes: number) => { + expect(() => { + new Cluster(stack, 'Redshift', { + masterUser: { + masterUsername: 'admin', + }, + vpc, + clusterType: ClusterType.MULTI_NODE, + numberOfNodes, + }); + }).toThrow(/Number of nodes for cluster type multi-node must be at least 2 and no more than 100/); + }); test('Multi-Node Clusters should allow input parameter for number of nodes', () => { // WHEN @@ -297,9 +276,11 @@ describe('parameter group', () => { Template.fromStack(stack).hasResourceProperties('AWS::Redshift::Cluster', { ClusterParameterGroupName: { Ref: 'ParamsA8366201' }, }); + }); test('Adding to the cluster parameter group on a cluster not instantiated with a parameter group', () => { + // WHEN const cluster = new Cluster(stack, 'Redshift', { clusterName: 'foobar', @@ -329,6 +310,7 @@ describe('parameter group', () => { }); test('Adding to the cluster parameter group on a cluster instantiated with a parameter group', () => { + // WHEN const group = new ClusterParameterGroup(stack, 'Params', { description: 'lorem ipsum', @@ -371,11 +353,7 @@ describe('parameter group', () => { // GIVEN const cluster = new Cluster(stack, 'Redshift', { clusterName: 'foobar', - parameterGroup: ClusterParameterGroup.fromClusterParameterGroupName( - stack, - 'Params', - 'foo', - ), + parameterGroup: ClusterParameterGroup.fromClusterParameterGroupName(stack, 'Params', 'foo'), masterUser: { masterUsername: 'admin', }, @@ -387,6 +365,7 @@ describe('parameter group', () => { // THEN .toThrowError('Cannot add a parameter to an imported parameter group'); }); + }); test('publicly accessible cluster', () => { @@ -422,12 +401,9 @@ test('imported cluster with imported security group honors allowAllOutbound', () cluster.connections.allowToAnyIpv4(ec2.Port.tcp(443)); // THEN - Template.fromStack(stack).hasResourceProperties( - 'AWS::EC2::SecurityGroupEgress', - { - GroupId: 'sg-123456789', - }, - ); + Template.fromStack(stack).hasResourceProperties('AWS::EC2::SecurityGroupEgress', { + GroupId: 'sg-123456789', + }); }); test('can create a cluster with logging enabled', () => { @@ -469,6 +445,7 @@ test('throws when trying to add rotation to a cluster without secret', () => { expect(() => { cluster.addRotationSingleUser(); }).toThrowError(); + }); test('throws validation error when trying to set encryptionKey without enabling encryption', () => { @@ -489,6 +466,7 @@ test('throws validation error when trying to set encryptionKey without enabling expect(() => { new Cluster(stack, 'Redshift', props); }).toThrowError(); + }); test('throws when trying to add single user rotation multiple times', () => { @@ -516,17 +494,10 @@ test('can use existing cluster subnet group', () => { masterUsername: 'admin', }, vpc, - subnetGroup: ClusterSubnetGroup.fromClusterSubnetGroupName( - stack, - 'Group', - 'my-existing-cluster-subnet-group', - ), + subnetGroup: ClusterSubnetGroup.fromClusterSubnetGroupName(stack, 'Group', 'my-existing-cluster-subnet-group'), }); - Template.fromStack(stack).resourceCountIs( - 'AWS::Redshift::ClusterSubnetGroup', - 0, - ); + Template.fromStack(stack).resourceCountIs('AWS::Redshift::ClusterSubnetGroup', 0); Template.fromStack(stack).hasResourceProperties('AWS::Redshift::Cluster', { ClusterSubnetGroupName: 'my-existing-cluster-subnet-group', }); @@ -571,9 +542,7 @@ test.each([ DBName: 'default_db', PubliclyAccessible: false, ClusterSubnetGroupName: { Ref: 'RedshiftSubnetsDFE70E0A' }, - VpcSecurityGroupIds: [ - { 'Fn::GetAtt': ['RedshiftSecurityGroup796D74A7', 'GroupId'] }, - ], + VpcSecurityGroupIds: [{ 'Fn::GetAtt': ['RedshiftSecurityGroup796D74A7', 'GroupId'] }], Classic: classicResizing, }, DeletionPolicy: 'Retain', @@ -605,9 +574,7 @@ test('resize type not set', () => { DBName: 'default_db', PubliclyAccessible: false, ClusterSubnetGroupName: { Ref: 'RedshiftSubnetsDFE70E0A' }, - VpcSecurityGroupIds: [ - { 'Fn::GetAtt': ['RedshiftSecurityGroup796D74A7', 'GroupId'] }, - ], + VpcSecurityGroupIds: [{ 'Fn::GetAtt': ['RedshiftSecurityGroup796D74A7', 'GroupId'] }], }, DeletionPolicy: 'Retain', UpdateReplacePolicy: 'Retain', @@ -639,9 +606,7 @@ test('elastic ip address', () => { DBName: 'default_db', PubliclyAccessible: false, ClusterSubnetGroupName: { Ref: 'RedshiftSubnetsDFE70E0A' }, - VpcSecurityGroupIds: [ - { 'Fn::GetAtt': ['RedshiftSecurityGroup796D74A7', 'GroupId'] }, - ], + VpcSecurityGroupIds: [{ 'Fn::GetAtt': ['RedshiftSecurityGroup796D74A7', 'GroupId'] }], ElasticIp: '1.3.3.7', }, DeletionPolicy: 'Retain', @@ -733,11 +698,7 @@ describe('reboot for Parameter Changes', () => { masterUsername: 'admin', }, vpc, - parameterGroup: ClusterParameterGroup.fromClusterParameterGroupName( - stack, - 'foo', - 'bar', - ), + parameterGroup: ClusterParameterGroup.fromClusterParameterGroupName(stack, 'foo', 'bar'), }); cluster.enableRebootForParameterChanges(); // WHEN @@ -775,10 +736,7 @@ describe('reboot for Parameter Changes', () => { //WHEN cluster.enableRebootForParameterChanges(); // THEN - Template.fromStack(stack).resourceCountIs( - 'Custom::RedshiftClusterRebooter', - 1, - ); + Template.fromStack(stack).resourceCountIs('Custom::RedshiftClusterRebooter', 1); }); test('cluster with parameter group', () => { @@ -837,23 +795,22 @@ describe('reboot for Parameter Changes', () => { //THEN const template = Template.fromStack(stack); template.hasResourceProperties('Custom::RedshiftClusterRebooter', { - ParametersString: JSON.stringify({ - foo: 'bar', - lorem: 'ipsum', - }), + ParametersString: JSON.stringify( + { + foo: 'bar', + lorem: 'ipsum', + }, + ), }); }); }); describe('default IAM role', () => { + test('Default role not in role list', () => { // GIVEN - const clusterRole1 = new iam.Role(stack, 'clusterRole1', { - assumedBy: new iam.ServicePrincipal('redshift.amazonaws.com'), - }); - const defaultRole1 = new iam.Role(stack, 'defaultRole1', { - assumedBy: new iam.ServicePrincipal('redshift.amazonaws.com'), - }); + const clusterRole1 = new iam.Role(stack, 'clusterRole1', { assumedBy: new iam.ServicePrincipal('redshift.amazonaws.com') }); + const defaultRole1 = new iam.Role(stack, 'defaultRole1', { assumedBy: new iam.ServicePrincipal('redshift.amazonaws.com') }); expect(() => { new Cluster(stack, 'Redshift', { @@ -868,9 +825,7 @@ describe('default IAM role', () => { }); test('throws error when default role not attached to cluster when adding default role post creation', () => { - const defaultRole1 = new iam.Role(stack, 'defaultRole1', { - assumedBy: new iam.ServicePrincipal('redshift.amazonaws.com'), - }); + const defaultRole1 = new iam.Role(stack, 'defaultRole1', { assumedBy: new iam.ServicePrincipal('redshift.amazonaws.com') }); const cluster = new Cluster(stack, 'Redshift', { masterUser: { masterUsername: 'admin', @@ -880,9 +835,7 @@ describe('default IAM role', () => { expect(() => { cluster.addDefaultIamRole(defaultRole1); - }).toThrow( - /Default role must be associated to the Redshift cluster to be set as the default role./, - ); + }).toThrow(/Default role must be associated to the Redshift cluster to be set as the default role./); }); }); @@ -944,9 +897,7 @@ describe('IAM role', () => { vpc, }); - const newTestStack = new cdk.Stack(stack, 'NewTestStack', { - env: { account: stack.account, region: stack.region }, - }); + const newTestStack = new cdk.Stack(stack, 'NewTestStack', { env: { account: stack.account, region: stack.region } }); const role = new iam.Role(newTestStack, 'Role', { assumedBy: new iam.ServicePrincipal('redshift.amazonaws.com'), }); @@ -958,11 +909,7 @@ describe('IAM role', () => { Template.fromStack(stack).hasResource('AWS::Redshift::Cluster', { Properties: { IamRoles: Match.arrayEquals([ - { - 'Fn::ImportValue': Match.stringLikeRegexp( - 'NewTestStack:ExportsOutputFnGetAttRole*', - ), - }, + { 'Fn::ImportValue': Match.stringLikeRegexp('NewTestStack:ExportsOutputFnGetAttRole*') }, ]), }, }); @@ -981,22 +928,16 @@ describe('IAM role', () => { roles: [role], }); - expect( - () => - // WHEN - cluster.addIamRole(role), + expect(() => + // WHEN + cluster.addIamRole(role), // THEN ).toThrow(`Role '${role.roleArn}' is already attached to the cluster`); }); }); function testStack() { - const newTestStack = new cdk.Stack(undefined, undefined, { - env: { account: '12345', region: 'us-test-1' }, - }); - newTestStack.node.setContext('availability-zones:12345:us-test-1', [ - 'us-test-1a', - 'us-test-1b', - ]); + const newTestStack = new cdk.Stack(undefined, undefined, { env: { account: '12345', region: 'us-test-1' } }); + newTestStack.node.setContext('availability-zones:12345:us-test-1', ['us-test-1a', 'us-test-1b']); return newTestStack; } From b1de6a6ce3e3edcca91bacf86fa2f1f584a65bb8 Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Mon, 29 Apr 2024 11:29:21 +0900 Subject: [PATCH 09/15] test: update integ test --- ...ssets.json => MultiAzRedshift.assets.json} | 6 +- ...ate.json => MultiAzRedshift.template.json} | 40 ++-- ...faultTestDeployAssert07040285.assets.json} | 2 +- ...ultTestDeployAssert07040285.template.json} | 0 .../integ.json | 8 +- .../manifest.json | 114 +++++------ .../tree.json | 178 +++++++++--------- .../test/integ.cluster-multi-az.ts | 4 +- 8 files changed, 176 insertions(+), 176 deletions(-) rename packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/{aws-cdk-redshift-cluster-database.assets.json => MultiAzRedshift.assets.json} (64%) rename packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/{aws-cdk-redshift-cluster-database.template.json => MultiAzRedshift.template.json} (92%) rename packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/{awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B.assets.json => MultiAzRedshiftTestDefaultTestDeployAssert07040285.assets.json} (87%) rename packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/{awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B.template.json => MultiAzRedshiftTestDefaultTestDeployAssert07040285.template.json} (100%) diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/aws-cdk-redshift-cluster-database.assets.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/MultiAzRedshift.assets.json similarity index 64% rename from packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/aws-cdk-redshift-cluster-database.assets.json rename to packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/MultiAzRedshift.assets.json index 2ad3496831dfd..61f34060d78fd 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/aws-cdk-redshift-cluster-database.assets.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/MultiAzRedshift.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "72b490317d843a0b349a9606d3196494e09ee685325d9c419033f2f302bd9765": { + "c2c282abac04283268fcc5f53da2bb783597d916fc0cef560cd7826453d8f439": { "source": { - "path": "aws-cdk-redshift-cluster-database.template.json", + "path": "MultiAzRedshift.template.json", "packaging": "file" }, "destinations": { "214794239830-us-east-1": { "bucketName": "cdk-hnb659fds-assets-214794239830-us-east-1", - "objectKey": "72b490317d843a0b349a9606d3196494e09ee685325d9c419033f2f302bd9765.json", + "objectKey": "c2c282abac04283268fcc5f53da2bb783597d916fc0cef560cd7826453d8f439.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::214794239830:role/cdk-hnb659fds-file-publishing-role-214794239830-us-east-1" } diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/aws-cdk-redshift-cluster-database.template.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/MultiAzRedshift.template.json similarity index 92% rename from packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/aws-cdk-redshift-cluster-database.template.json rename to packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/MultiAzRedshift.template.json index 834bd6495cb93..a97b027ea5cf5 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/aws-cdk-redshift-cluster-database.template.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/MultiAzRedshift.template.json @@ -10,7 +10,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc" + "Value": "MultiAzRedshift/Vpc" } ] }, @@ -34,7 +34,7 @@ }, { "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1" + "Value": "MultiAzRedshift/Vpc/PublicSubnet1" } ], "VpcId": { @@ -50,7 +50,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1" + "Value": "MultiAzRedshift/Vpc/PublicSubnet1" } ], "VpcId": { @@ -97,7 +97,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1" + "Value": "MultiAzRedshift/Vpc/PublicSubnet1" } ] }, @@ -119,7 +119,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1" + "Value": "MultiAzRedshift/Vpc/PublicSubnet1" } ] }, @@ -147,7 +147,7 @@ }, { "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2" + "Value": "MultiAzRedshift/Vpc/PublicSubnet2" } ], "VpcId": { @@ -163,7 +163,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2" + "Value": "MultiAzRedshift/Vpc/PublicSubnet2" } ], "VpcId": { @@ -210,7 +210,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2" + "Value": "MultiAzRedshift/Vpc/PublicSubnet2" } ] }, @@ -232,7 +232,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2" + "Value": "MultiAzRedshift/Vpc/PublicSubnet2" } ] }, @@ -260,7 +260,7 @@ }, { "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3" + "Value": "MultiAzRedshift/Vpc/PublicSubnet3" } ], "VpcId": { @@ -276,7 +276,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3" + "Value": "MultiAzRedshift/Vpc/PublicSubnet3" } ], "VpcId": { @@ -323,7 +323,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3" + "Value": "MultiAzRedshift/Vpc/PublicSubnet3" } ] }, @@ -345,7 +345,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3" + "Value": "MultiAzRedshift/Vpc/PublicSubnet3" } ] }, @@ -373,7 +373,7 @@ }, { "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1" + "Value": "MultiAzRedshift/Vpc/PrivateSubnet1" } ], "VpcId": { @@ -389,7 +389,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1" + "Value": "MultiAzRedshift/Vpc/PrivateSubnet1" } ], "VpcId": { @@ -443,7 +443,7 @@ }, { "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2" + "Value": "MultiAzRedshift/Vpc/PrivateSubnet2" } ], "VpcId": { @@ -459,7 +459,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2" + "Value": "MultiAzRedshift/Vpc/PrivateSubnet2" } ], "VpcId": { @@ -513,7 +513,7 @@ }, { "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3" + "Value": "MultiAzRedshift/Vpc/PrivateSubnet3" } ], "VpcId": { @@ -529,7 +529,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3" + "Value": "MultiAzRedshift/Vpc/PrivateSubnet3" } ], "VpcId": { @@ -572,7 +572,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-cdk-redshift-cluster-database/Vpc" + "Value": "MultiAzRedshift/Vpc" } ] }, diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B.assets.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/MultiAzRedshiftTestDefaultTestDeployAssert07040285.assets.json similarity index 87% rename from packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B.assets.json rename to packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/MultiAzRedshiftTestDefaultTestDeployAssert07040285.assets.json index d338dc103b6a6..68598a246c0ad 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B.assets.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/MultiAzRedshiftTestDefaultTestDeployAssert07040285.assets.json @@ -3,7 +3,7 @@ "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { - "path": "awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B.template.json", + "path": "MultiAzRedshiftTestDefaultTestDeployAssert07040285.template.json", "packaging": "file" }, "destinations": { diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B.template.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/MultiAzRedshiftTestDefaultTestDeployAssert07040285.template.json similarity index 100% rename from packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B.template.json rename to packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/MultiAzRedshiftTestDefaultTestDeployAssert07040285.template.json diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/integ.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/integ.json index f302134300721..5929fc517ac89 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/integ.json @@ -1,12 +1,12 @@ { "version": "36.0.0", "testCases": { - "aws-cdk-redshift-multi-az/DefaultTest": { + "MultiAzRedshiftTest/DefaultTest": { "stacks": [ - "aws-cdk-redshift-cluster-database" + "MultiAzRedshift" ], - "assertionStack": "aws-cdk-redshift-multi-az/DefaultTest/DeployAssert", - "assertionStackName": "awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B" + "assertionStack": "MultiAzRedshiftTest/DefaultTest/DeployAssert", + "assertionStackName": "MultiAzRedshiftTestDefaultTestDeployAssert07040285" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/manifest.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/manifest.json index 07ae36365eba6..a6035dfc94893 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/manifest.json @@ -1,28 +1,28 @@ { "version": "36.0.0", "artifacts": { - "aws-cdk-redshift-cluster-database.assets": { + "MultiAzRedshift.assets": { "type": "cdk:asset-manifest", "properties": { - "file": "aws-cdk-redshift-cluster-database.assets.json", + "file": "MultiAzRedshift.assets.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" } }, - "aws-cdk-redshift-cluster-database": { + "MultiAzRedshift": { "type": "aws:cloudformation:stack", "environment": "aws://214794239830/us-east-1", "properties": { - "templateFile": "aws-cdk-redshift-cluster-database.template.json", + "templateFile": "MultiAzRedshift.template.json", "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::214794239830:role/cdk-hnb659fds-deploy-role-214794239830-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::214794239830:role/cdk-hnb659fds-cfn-exec-role-214794239830-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-214794239830-us-east-1/72b490317d843a0b349a9606d3196494e09ee685325d9c419033f2f302bd9765.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-214794239830-us-east-1/c2c282abac04283268fcc5f53da2bb783597d916fc0cef560cd7826453d8f439.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ - "aws-cdk-redshift-cluster-database.assets" + "MultiAzRedshift.assets" ], "lookupRole": { "arn": "arn:${AWS::Partition}:iam::214794239830:role/cdk-hnb659fds-lookup-role-214794239830-us-east-1", @@ -31,265 +31,265 @@ } }, "dependencies": [ - "aws-cdk-redshift-cluster-database.assets" + "MultiAzRedshift.assets" ], "metadata": { - "/aws-cdk-redshift-cluster-database/Vpc/Resource": [ + "/MultiAzRedshift/Vpc/Resource": [ { "type": "aws:cdk:logicalId", "data": "Vpc8378EB38" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1/Subnet": [ + "/MultiAzRedshift/Vpc/PublicSubnet1/Subnet": [ { "type": "aws:cdk:logicalId", "data": "VpcPublicSubnet1Subnet5C2D37C4" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1/RouteTable": [ + "/MultiAzRedshift/Vpc/PublicSubnet1/RouteTable": [ { "type": "aws:cdk:logicalId", "data": "VpcPublicSubnet1RouteTable6C95E38E" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1/RouteTableAssociation": [ + "/MultiAzRedshift/Vpc/PublicSubnet1/RouteTableAssociation": [ { "type": "aws:cdk:logicalId", "data": "VpcPublicSubnet1RouteTableAssociation97140677" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1/DefaultRoute": [ + "/MultiAzRedshift/Vpc/PublicSubnet1/DefaultRoute": [ { "type": "aws:cdk:logicalId", "data": "VpcPublicSubnet1DefaultRoute3DA9E72A" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1/EIP": [ + "/MultiAzRedshift/Vpc/PublicSubnet1/EIP": [ { "type": "aws:cdk:logicalId", "data": "VpcPublicSubnet1EIPD7E02669" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1/NATGateway": [ + "/MultiAzRedshift/Vpc/PublicSubnet1/NATGateway": [ { "type": "aws:cdk:logicalId", "data": "VpcPublicSubnet1NATGateway4D7517AA" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2/Subnet": [ + "/MultiAzRedshift/Vpc/PublicSubnet2/Subnet": [ { "type": "aws:cdk:logicalId", "data": "VpcPublicSubnet2Subnet691E08A3" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2/RouteTable": [ + "/MultiAzRedshift/Vpc/PublicSubnet2/RouteTable": [ { "type": "aws:cdk:logicalId", "data": "VpcPublicSubnet2RouteTable94F7E489" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2/RouteTableAssociation": [ + "/MultiAzRedshift/Vpc/PublicSubnet2/RouteTableAssociation": [ { "type": "aws:cdk:logicalId", "data": "VpcPublicSubnet2RouteTableAssociationDD5762D8" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2/DefaultRoute": [ + "/MultiAzRedshift/Vpc/PublicSubnet2/DefaultRoute": [ { "type": "aws:cdk:logicalId", "data": "VpcPublicSubnet2DefaultRoute97F91067" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2/EIP": [ + "/MultiAzRedshift/Vpc/PublicSubnet2/EIP": [ { "type": "aws:cdk:logicalId", "data": "VpcPublicSubnet2EIP3C605A87" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2/NATGateway": [ + "/MultiAzRedshift/Vpc/PublicSubnet2/NATGateway": [ { "type": "aws:cdk:logicalId", "data": "VpcPublicSubnet2NATGateway9182C01D" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3/Subnet": [ + "/MultiAzRedshift/Vpc/PublicSubnet3/Subnet": [ { "type": "aws:cdk:logicalId", "data": "VpcPublicSubnet3SubnetBE12F0B6" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3/RouteTable": [ + "/MultiAzRedshift/Vpc/PublicSubnet3/RouteTable": [ { "type": "aws:cdk:logicalId", "data": "VpcPublicSubnet3RouteTable93458DBB" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3/RouteTableAssociation": [ + "/MultiAzRedshift/Vpc/PublicSubnet3/RouteTableAssociation": [ { "type": "aws:cdk:logicalId", "data": "VpcPublicSubnet3RouteTableAssociation1F1EDF02" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3/DefaultRoute": [ + "/MultiAzRedshift/Vpc/PublicSubnet3/DefaultRoute": [ { "type": "aws:cdk:logicalId", "data": "VpcPublicSubnet3DefaultRoute4697774F" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3/EIP": [ + "/MultiAzRedshift/Vpc/PublicSubnet3/EIP": [ { "type": "aws:cdk:logicalId", "data": "VpcPublicSubnet3EIP3A666A23" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3/NATGateway": [ + "/MultiAzRedshift/Vpc/PublicSubnet3/NATGateway": [ { "type": "aws:cdk:logicalId", "data": "VpcPublicSubnet3NATGateway7640CD1D" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1/Subnet": [ + "/MultiAzRedshift/Vpc/PrivateSubnet1/Subnet": [ { "type": "aws:cdk:logicalId", "data": "VpcPrivateSubnet1Subnet536B997A" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1/RouteTable": [ + "/MultiAzRedshift/Vpc/PrivateSubnet1/RouteTable": [ { "type": "aws:cdk:logicalId", "data": "VpcPrivateSubnet1RouteTableB2C5B500" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1/RouteTableAssociation": [ + "/MultiAzRedshift/Vpc/PrivateSubnet1/RouteTableAssociation": [ { "type": "aws:cdk:logicalId", "data": "VpcPrivateSubnet1RouteTableAssociation70C59FA6" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1/DefaultRoute": [ + "/MultiAzRedshift/Vpc/PrivateSubnet1/DefaultRoute": [ { "type": "aws:cdk:logicalId", "data": "VpcPrivateSubnet1DefaultRouteBE02A9ED" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2/Subnet": [ + "/MultiAzRedshift/Vpc/PrivateSubnet2/Subnet": [ { "type": "aws:cdk:logicalId", "data": "VpcPrivateSubnet2Subnet3788AAA1" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2/RouteTable": [ + "/MultiAzRedshift/Vpc/PrivateSubnet2/RouteTable": [ { "type": "aws:cdk:logicalId", "data": "VpcPrivateSubnet2RouteTableA678073B" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2/RouteTableAssociation": [ + "/MultiAzRedshift/Vpc/PrivateSubnet2/RouteTableAssociation": [ { "type": "aws:cdk:logicalId", "data": "VpcPrivateSubnet2RouteTableAssociationA89CAD56" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2/DefaultRoute": [ + "/MultiAzRedshift/Vpc/PrivateSubnet2/DefaultRoute": [ { "type": "aws:cdk:logicalId", "data": "VpcPrivateSubnet2DefaultRoute060D2087" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3/Subnet": [ + "/MultiAzRedshift/Vpc/PrivateSubnet3/Subnet": [ { "type": "aws:cdk:logicalId", "data": "VpcPrivateSubnet3SubnetF258B56E" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3/RouteTable": [ + "/MultiAzRedshift/Vpc/PrivateSubnet3/RouteTable": [ { "type": "aws:cdk:logicalId", "data": "VpcPrivateSubnet3RouteTableD98824C7" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3/RouteTableAssociation": [ + "/MultiAzRedshift/Vpc/PrivateSubnet3/RouteTableAssociation": [ { "type": "aws:cdk:logicalId", "data": "VpcPrivateSubnet3RouteTableAssociation16BDDC43" } ], - "/aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3/DefaultRoute": [ + "/MultiAzRedshift/Vpc/PrivateSubnet3/DefaultRoute": [ { "type": "aws:cdk:logicalId", "data": "VpcPrivateSubnet3DefaultRoute94B74F0D" } ], - "/aws-cdk-redshift-cluster-database/Vpc/IGW": [ + "/MultiAzRedshift/Vpc/IGW": [ { "type": "aws:cdk:logicalId", "data": "VpcIGWD7BA715C" } ], - "/aws-cdk-redshift-cluster-database/Vpc/VPCGW": [ + "/MultiAzRedshift/Vpc/VPCGW": [ { "type": "aws:cdk:logicalId", "data": "VpcVPCGWBF912B6E" } ], - "/aws-cdk-redshift-cluster-database/Cluster/Subnets/Default": [ + "/MultiAzRedshift/Cluster/Subnets/Default": [ { "type": "aws:cdk:logicalId", "data": "ClusterSubnetsDCFA5CB7" } ], - "/aws-cdk-redshift-cluster-database/Cluster/SecurityGroup/Resource": [ + "/MultiAzRedshift/Cluster/SecurityGroup/Resource": [ { "type": "aws:cdk:logicalId", "data": "ClusterSecurityGroup0921994B" } ], - "/aws-cdk-redshift-cluster-database/Cluster/Secret/Resource": [ + "/MultiAzRedshift/Cluster/Secret/Resource": [ { "type": "aws:cdk:logicalId", "data": "ClusterSecret6368BD0F" } ], - "/aws-cdk-redshift-cluster-database/Cluster/Secret/Attachment/Resource": [ + "/MultiAzRedshift/Cluster/Secret/Attachment/Resource": [ { "type": "aws:cdk:logicalId", "data": "ClusterSecretAttachment769E6258" } ], - "/aws-cdk-redshift-cluster-database/Cluster/Resource": [ + "/MultiAzRedshift/Cluster/Resource": [ { "type": "aws:cdk:logicalId", "data": "ClusterEB0386A7" } ], - "/aws-cdk-redshift-cluster-database/BootstrapVersion": [ + "/MultiAzRedshift/BootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "BootstrapVersion" } ], - "/aws-cdk-redshift-cluster-database/CheckBootstrapVersion": [ + "/MultiAzRedshift/CheckBootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } ] }, - "displayName": "aws-cdk-redshift-cluster-database" + "displayName": "MultiAzRedshift" }, - "awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B.assets": { + "MultiAzRedshiftTestDefaultTestDeployAssert07040285.assets": { "type": "cdk:asset-manifest", "properties": { - "file": "awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B.assets.json", + "file": "MultiAzRedshiftTestDefaultTestDeployAssert07040285.assets.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" } }, - "awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B": { + "MultiAzRedshiftTestDefaultTestDeployAssert07040285": { "type": "aws:cloudformation:stack", "environment": "aws://unknown-account/unknown-region", "properties": { - "templateFile": "awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B.template.json", + "templateFile": "MultiAzRedshiftTestDefaultTestDeployAssert07040285.template.json", "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", @@ -298,7 +298,7 @@ "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ - "awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B.assets" + "MultiAzRedshiftTestDefaultTestDeployAssert07040285.assets" ], "lookupRole": { "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", @@ -307,23 +307,23 @@ } }, "dependencies": [ - "awscdkredshiftmultiazDefaultTestDeployAssert27E37E1B.assets" + "MultiAzRedshiftTestDefaultTestDeployAssert07040285.assets" ], "metadata": { - "/aws-cdk-redshift-multi-az/DefaultTest/DeployAssert/BootstrapVersion": [ + "/MultiAzRedshiftTest/DefaultTest/DeployAssert/BootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "BootstrapVersion" } ], - "/aws-cdk-redshift-multi-az/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + "/MultiAzRedshiftTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } ] }, - "displayName": "aws-cdk-redshift-multi-az/DefaultTest/DeployAssert" + "displayName": "MultiAzRedshiftTest/DefaultTest/DeployAssert" }, "Tree": { "type": "cdk:tree", diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/tree.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/tree.json index 2c3555daf4c4f..e74c8975ff13d 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.js.snapshot/tree.json @@ -4,17 +4,17 @@ "id": "App", "path": "", "children": { - "aws-cdk-redshift-cluster-database": { - "id": "aws-cdk-redshift-cluster-database", - "path": "aws-cdk-redshift-cluster-database", + "MultiAzRedshift": { + "id": "MultiAzRedshift", + "path": "MultiAzRedshift", "children": { "Vpc": { "id": "Vpc", - "path": "aws-cdk-redshift-cluster-database/Vpc", + "path": "MultiAzRedshift/Vpc", "children": { "Resource": { "id": "Resource", - "path": "aws-cdk-redshift-cluster-database/Vpc/Resource", + "path": "MultiAzRedshift/Vpc/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::VPC", "aws:cdk:cloudformation:props": { @@ -25,7 +25,7 @@ "tags": [ { "key": "Name", - "value": "aws-cdk-redshift-cluster-database/Vpc" + "value": "MultiAzRedshift/Vpc" } ] } @@ -37,11 +37,11 @@ }, "PublicSubnet1": { "id": "PublicSubnet1", - "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1", + "path": "MultiAzRedshift/Vpc/PublicSubnet1", "children": { "Subnet": { "id": "Subnet", - "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1/Subnet", + "path": "MultiAzRedshift/Vpc/PublicSubnet1/Subnet", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { @@ -59,7 +59,7 @@ }, { "key": "Name", - "value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1" + "value": "MultiAzRedshift/Vpc/PublicSubnet1" } ], "vpcId": { @@ -74,7 +74,7 @@ }, "Acl": { "id": "Acl", - "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1/Acl", + "path": "MultiAzRedshift/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" @@ -82,14 +82,14 @@ }, "RouteTable": { "id": "RouteTable", - "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1/RouteTable", + "path": "MultiAzRedshift/Vpc/PublicSubnet1/RouteTable", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { "tags": [ { "key": "Name", - "value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1" + "value": "MultiAzRedshift/Vpc/PublicSubnet1" } ], "vpcId": { @@ -104,7 +104,7 @@ }, "RouteTableAssociation": { "id": "RouteTableAssociation", - "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1/RouteTableAssociation", + "path": "MultiAzRedshift/Vpc/PublicSubnet1/RouteTableAssociation", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", "aws:cdk:cloudformation:props": { @@ -123,7 +123,7 @@ }, "DefaultRoute": { "id": "DefaultRoute", - "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1/DefaultRoute", + "path": "MultiAzRedshift/Vpc/PublicSubnet1/DefaultRoute", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { @@ -143,7 +143,7 @@ }, "EIP": { "id": "EIP", - "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1/EIP", + "path": "MultiAzRedshift/Vpc/PublicSubnet1/EIP", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::EIP", "aws:cdk:cloudformation:props": { @@ -151,7 +151,7 @@ "tags": [ { "key": "Name", - "value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1" + "value": "MultiAzRedshift/Vpc/PublicSubnet1" } ] } @@ -163,7 +163,7 @@ }, "NATGateway": { "id": "NATGateway", - "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1/NATGateway", + "path": "MultiAzRedshift/Vpc/PublicSubnet1/NATGateway", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", "aws:cdk:cloudformation:props": { @@ -179,7 +179,7 @@ "tags": [ { "key": "Name", - "value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1" + "value": "MultiAzRedshift/Vpc/PublicSubnet1" } ] } @@ -197,11 +197,11 @@ }, "PublicSubnet2": { "id": "PublicSubnet2", - "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2", + "path": "MultiAzRedshift/Vpc/PublicSubnet2", "children": { "Subnet": { "id": "Subnet", - "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2/Subnet", + "path": "MultiAzRedshift/Vpc/PublicSubnet2/Subnet", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { @@ -219,7 +219,7 @@ }, { "key": "Name", - "value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2" + "value": "MultiAzRedshift/Vpc/PublicSubnet2" } ], "vpcId": { @@ -234,7 +234,7 @@ }, "Acl": { "id": "Acl", - "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2/Acl", + "path": "MultiAzRedshift/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" @@ -242,14 +242,14 @@ }, "RouteTable": { "id": "RouteTable", - "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2/RouteTable", + "path": "MultiAzRedshift/Vpc/PublicSubnet2/RouteTable", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { "tags": [ { "key": "Name", - "value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2" + "value": "MultiAzRedshift/Vpc/PublicSubnet2" } ], "vpcId": { @@ -264,7 +264,7 @@ }, "RouteTableAssociation": { "id": "RouteTableAssociation", - "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2/RouteTableAssociation", + "path": "MultiAzRedshift/Vpc/PublicSubnet2/RouteTableAssociation", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", "aws:cdk:cloudformation:props": { @@ -283,7 +283,7 @@ }, "DefaultRoute": { "id": "DefaultRoute", - "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2/DefaultRoute", + "path": "MultiAzRedshift/Vpc/PublicSubnet2/DefaultRoute", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { @@ -303,7 +303,7 @@ }, "EIP": { "id": "EIP", - "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2/EIP", + "path": "MultiAzRedshift/Vpc/PublicSubnet2/EIP", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::EIP", "aws:cdk:cloudformation:props": { @@ -311,7 +311,7 @@ "tags": [ { "key": "Name", - "value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2" + "value": "MultiAzRedshift/Vpc/PublicSubnet2" } ] } @@ -323,7 +323,7 @@ }, "NATGateway": { "id": "NATGateway", - "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2/NATGateway", + "path": "MultiAzRedshift/Vpc/PublicSubnet2/NATGateway", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", "aws:cdk:cloudformation:props": { @@ -339,7 +339,7 @@ "tags": [ { "key": "Name", - "value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2" + "value": "MultiAzRedshift/Vpc/PublicSubnet2" } ] } @@ -357,11 +357,11 @@ }, "PublicSubnet3": { "id": "PublicSubnet3", - "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3", + "path": "MultiAzRedshift/Vpc/PublicSubnet3", "children": { "Subnet": { "id": "Subnet", - "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3/Subnet", + "path": "MultiAzRedshift/Vpc/PublicSubnet3/Subnet", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { @@ -379,7 +379,7 @@ }, { "key": "Name", - "value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3" + "value": "MultiAzRedshift/Vpc/PublicSubnet3" } ], "vpcId": { @@ -394,7 +394,7 @@ }, "Acl": { "id": "Acl", - "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3/Acl", + "path": "MultiAzRedshift/Vpc/PublicSubnet3/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" @@ -402,14 +402,14 @@ }, "RouteTable": { "id": "RouteTable", - "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3/RouteTable", + "path": "MultiAzRedshift/Vpc/PublicSubnet3/RouteTable", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { "tags": [ { "key": "Name", - "value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3" + "value": "MultiAzRedshift/Vpc/PublicSubnet3" } ], "vpcId": { @@ -424,7 +424,7 @@ }, "RouteTableAssociation": { "id": "RouteTableAssociation", - "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3/RouteTableAssociation", + "path": "MultiAzRedshift/Vpc/PublicSubnet3/RouteTableAssociation", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", "aws:cdk:cloudformation:props": { @@ -443,7 +443,7 @@ }, "DefaultRoute": { "id": "DefaultRoute", - "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3/DefaultRoute", + "path": "MultiAzRedshift/Vpc/PublicSubnet3/DefaultRoute", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { @@ -463,7 +463,7 @@ }, "EIP": { "id": "EIP", - "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3/EIP", + "path": "MultiAzRedshift/Vpc/PublicSubnet3/EIP", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::EIP", "aws:cdk:cloudformation:props": { @@ -471,7 +471,7 @@ "tags": [ { "key": "Name", - "value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3" + "value": "MultiAzRedshift/Vpc/PublicSubnet3" } ] } @@ -483,7 +483,7 @@ }, "NATGateway": { "id": "NATGateway", - "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3/NATGateway", + "path": "MultiAzRedshift/Vpc/PublicSubnet3/NATGateway", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", "aws:cdk:cloudformation:props": { @@ -499,7 +499,7 @@ "tags": [ { "key": "Name", - "value": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet3" + "value": "MultiAzRedshift/Vpc/PublicSubnet3" } ] } @@ -517,11 +517,11 @@ }, "PrivateSubnet1": { "id": "PrivateSubnet1", - "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1", + "path": "MultiAzRedshift/Vpc/PrivateSubnet1", "children": { "Subnet": { "id": "Subnet", - "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1/Subnet", + "path": "MultiAzRedshift/Vpc/PrivateSubnet1/Subnet", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { @@ -539,7 +539,7 @@ }, { "key": "Name", - "value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1" + "value": "MultiAzRedshift/Vpc/PrivateSubnet1" } ], "vpcId": { @@ -554,7 +554,7 @@ }, "Acl": { "id": "Acl", - "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1/Acl", + "path": "MultiAzRedshift/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" @@ -562,14 +562,14 @@ }, "RouteTable": { "id": "RouteTable", - "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1/RouteTable", + "path": "MultiAzRedshift/Vpc/PrivateSubnet1/RouteTable", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { "tags": [ { "key": "Name", - "value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1" + "value": "MultiAzRedshift/Vpc/PrivateSubnet1" } ], "vpcId": { @@ -584,7 +584,7 @@ }, "RouteTableAssociation": { "id": "RouteTableAssociation", - "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1/RouteTableAssociation", + "path": "MultiAzRedshift/Vpc/PrivateSubnet1/RouteTableAssociation", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", "aws:cdk:cloudformation:props": { @@ -603,7 +603,7 @@ }, "DefaultRoute": { "id": "DefaultRoute", - "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1/DefaultRoute", + "path": "MultiAzRedshift/Vpc/PrivateSubnet1/DefaultRoute", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { @@ -629,11 +629,11 @@ }, "PrivateSubnet2": { "id": "PrivateSubnet2", - "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2", + "path": "MultiAzRedshift/Vpc/PrivateSubnet2", "children": { "Subnet": { "id": "Subnet", - "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2/Subnet", + "path": "MultiAzRedshift/Vpc/PrivateSubnet2/Subnet", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { @@ -651,7 +651,7 @@ }, { "key": "Name", - "value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2" + "value": "MultiAzRedshift/Vpc/PrivateSubnet2" } ], "vpcId": { @@ -666,7 +666,7 @@ }, "Acl": { "id": "Acl", - "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2/Acl", + "path": "MultiAzRedshift/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" @@ -674,14 +674,14 @@ }, "RouteTable": { "id": "RouteTable", - "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2/RouteTable", + "path": "MultiAzRedshift/Vpc/PrivateSubnet2/RouteTable", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { "tags": [ { "key": "Name", - "value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2" + "value": "MultiAzRedshift/Vpc/PrivateSubnet2" } ], "vpcId": { @@ -696,7 +696,7 @@ }, "RouteTableAssociation": { "id": "RouteTableAssociation", - "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2/RouteTableAssociation", + "path": "MultiAzRedshift/Vpc/PrivateSubnet2/RouteTableAssociation", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", "aws:cdk:cloudformation:props": { @@ -715,7 +715,7 @@ }, "DefaultRoute": { "id": "DefaultRoute", - "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2/DefaultRoute", + "path": "MultiAzRedshift/Vpc/PrivateSubnet2/DefaultRoute", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { @@ -741,11 +741,11 @@ }, "PrivateSubnet3": { "id": "PrivateSubnet3", - "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3", + "path": "MultiAzRedshift/Vpc/PrivateSubnet3", "children": { "Subnet": { "id": "Subnet", - "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3/Subnet", + "path": "MultiAzRedshift/Vpc/PrivateSubnet3/Subnet", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { @@ -763,7 +763,7 @@ }, { "key": "Name", - "value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3" + "value": "MultiAzRedshift/Vpc/PrivateSubnet3" } ], "vpcId": { @@ -778,7 +778,7 @@ }, "Acl": { "id": "Acl", - "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3/Acl", + "path": "MultiAzRedshift/Vpc/PrivateSubnet3/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" @@ -786,14 +786,14 @@ }, "RouteTable": { "id": "RouteTable", - "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3/RouteTable", + "path": "MultiAzRedshift/Vpc/PrivateSubnet3/RouteTable", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { "tags": [ { "key": "Name", - "value": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3" + "value": "MultiAzRedshift/Vpc/PrivateSubnet3" } ], "vpcId": { @@ -808,7 +808,7 @@ }, "RouteTableAssociation": { "id": "RouteTableAssociation", - "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3/RouteTableAssociation", + "path": "MultiAzRedshift/Vpc/PrivateSubnet3/RouteTableAssociation", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", "aws:cdk:cloudformation:props": { @@ -827,7 +827,7 @@ }, "DefaultRoute": { "id": "DefaultRoute", - "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet3/DefaultRoute", + "path": "MultiAzRedshift/Vpc/PrivateSubnet3/DefaultRoute", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { @@ -853,14 +853,14 @@ }, "IGW": { "id": "IGW", - "path": "aws-cdk-redshift-cluster-database/Vpc/IGW", + "path": "MultiAzRedshift/Vpc/IGW", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::InternetGateway", "aws:cdk:cloudformation:props": { "tags": [ { "key": "Name", - "value": "aws-cdk-redshift-cluster-database/Vpc" + "value": "MultiAzRedshift/Vpc" } ] } @@ -872,7 +872,7 @@ }, "VPCGW": { "id": "VPCGW", - "path": "aws-cdk-redshift-cluster-database/Vpc/VPCGW", + "path": "MultiAzRedshift/Vpc/VPCGW", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::VPCGatewayAttachment", "aws:cdk:cloudformation:props": { @@ -897,15 +897,15 @@ }, "Cluster": { "id": "Cluster", - "path": "aws-cdk-redshift-cluster-database/Cluster", + "path": "MultiAzRedshift/Cluster", "children": { "Subnets": { "id": "Subnets", - "path": "aws-cdk-redshift-cluster-database/Cluster/Subnets", + "path": "MultiAzRedshift/Cluster/Subnets", "children": { "Default": { "id": "Default", - "path": "aws-cdk-redshift-cluster-database/Cluster/Subnets/Default", + "path": "MultiAzRedshift/Cluster/Subnets/Default", "attributes": { "aws:cdk:cloudformation:type": "AWS::Redshift::ClusterSubnetGroup", "aws:cdk:cloudformation:props": { @@ -936,11 +936,11 @@ }, "SecurityGroup": { "id": "SecurityGroup", - "path": "aws-cdk-redshift-cluster-database/Cluster/SecurityGroup", + "path": "MultiAzRedshift/Cluster/SecurityGroup", "children": { "Resource": { "id": "Resource", - "path": "aws-cdk-redshift-cluster-database/Cluster/SecurityGroup/Resource", + "path": "MultiAzRedshift/Cluster/SecurityGroup/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", "aws:cdk:cloudformation:props": { @@ -970,11 +970,11 @@ }, "Secret": { "id": "Secret", - "path": "aws-cdk-redshift-cluster-database/Cluster/Secret", + "path": "MultiAzRedshift/Cluster/Secret", "children": { "Resource": { "id": "Resource", - "path": "aws-cdk-redshift-cluster-database/Cluster/Secret/Resource", + "path": "MultiAzRedshift/Cluster/Secret/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::SecretsManager::Secret", "aws:cdk:cloudformation:props": { @@ -993,11 +993,11 @@ }, "Attachment": { "id": "Attachment", - "path": "aws-cdk-redshift-cluster-database/Cluster/Secret/Attachment", + "path": "MultiAzRedshift/Cluster/Secret/Attachment", "children": { "Resource": { "id": "Resource", - "path": "aws-cdk-redshift-cluster-database/Cluster/Secret/Attachment/Resource", + "path": "MultiAzRedshift/Cluster/Secret/Attachment/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::SecretsManager::SecretTargetAttachment", "aws:cdk:cloudformation:props": { @@ -1029,7 +1029,7 @@ }, "Resource": { "id": "Resource", - "path": "aws-cdk-redshift-cluster-database/Cluster/Resource", + "path": "MultiAzRedshift/Cluster/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Redshift::Cluster", "aws:cdk:cloudformation:props": { @@ -1092,7 +1092,7 @@ }, "BootstrapVersion": { "id": "BootstrapVersion", - "path": "aws-cdk-redshift-cluster-database/BootstrapVersion", + "path": "MultiAzRedshift/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", "version": "0.0.0" @@ -1100,7 +1100,7 @@ }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", - "path": "aws-cdk-redshift-cluster-database/CheckBootstrapVersion", + "path": "MultiAzRedshift/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", "version": "0.0.0" @@ -1112,17 +1112,17 @@ "version": "0.0.0" } }, - "aws-cdk-redshift-multi-az": { - "id": "aws-cdk-redshift-multi-az", - "path": "aws-cdk-redshift-multi-az", + "MultiAzRedshiftTest": { + "id": "MultiAzRedshiftTest", + "path": "MultiAzRedshiftTest", "children": { "DefaultTest": { "id": "DefaultTest", - "path": "aws-cdk-redshift-multi-az/DefaultTest", + "path": "MultiAzRedshiftTest/DefaultTest", "children": { "Default": { "id": "Default", - "path": "aws-cdk-redshift-multi-az/DefaultTest/Default", + "path": "MultiAzRedshiftTest/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", "version": "10.3.0" @@ -1130,11 +1130,11 @@ }, "DeployAssert": { "id": "DeployAssert", - "path": "aws-cdk-redshift-multi-az/DefaultTest/DeployAssert", + "path": "MultiAzRedshiftTest/DefaultTest/DeployAssert", "children": { "BootstrapVersion": { "id": "BootstrapVersion", - "path": "aws-cdk-redshift-multi-az/DefaultTest/DeployAssert/BootstrapVersion", + "path": "MultiAzRedshiftTest/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", "version": "0.0.0" @@ -1142,7 +1142,7 @@ }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", - "path": "aws-cdk-redshift-multi-az/DefaultTest/DeployAssert/CheckBootstrapVersion", + "path": "MultiAzRedshiftTest/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", "version": "0.0.0" diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.ts b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.ts index f6f5aad771bc1..be828068b6bec 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.ts +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-multi-az.ts @@ -9,7 +9,7 @@ const app = new cdk.App({ 'availability-zones:account=123456789012:region=us-east-1': ['us-east-1a', 'us-east-1b', 'us-east-1c'], }, }); -const stack = new cdk.Stack(app, 'aws-cdk-redshift-cluster-database', { +const stack = new cdk.Stack(app, 'MultiAzRedshift', { env: { account: '123456789012', region: 'us-east-1', @@ -42,6 +42,6 @@ new redshift.Cluster(stack, 'Cluster', { multiAz: true, }); -new integ.IntegTest(app, 'aws-cdk-redshift-multi-az', { +new integ.IntegTest(app, 'MultiAzRedshiftTest', { testCases: [stack], }); From 7c78475ef60a313cbab885ee75c64d8b833a04eb Mon Sep 17 00:00:00 2001 From: kazuho cryer-shinozuka Date: Thu, 2 May 2024 16:26:18 +0900 Subject: [PATCH 10/15] Update packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts Co-authored-by: k.goto <24818752+go-to-k@users.noreply.github.com> --- packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts b/packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts index 6792ef447d28c..e839fcc7937c0 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts +++ b/packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts @@ -389,7 +389,7 @@ export interface ClusterProps { /** * Indicating whether Amazon Redshift should deploy the cluster in two Availability Zones. * - * @default false + * @default - false */ readonly multiAz?: boolean; } From 75bb92be175dee6860bd1023ff99cc965834f70c Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Thu, 2 May 2024 16:31:17 +0900 Subject: [PATCH 11/15] fix: adrressing review comment --- packages/@aws-cdk/aws-redshift-alpha/README.md | 7 +++++-- packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/@aws-cdk/aws-redshift-alpha/README.md b/packages/@aws-cdk/aws-redshift-alpha/README.md index ca7a2ed2c8571..ea7e4499baed9 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/README.md +++ b/packages/@aws-cdk/aws-redshift-alpha/README.md @@ -556,11 +556,14 @@ const cluster = new Cluster(this, 'Redshift', { cluster.addIamRole(role); ``` -## [Multi-AZ](https://docs.aws.amazon.com/redshift/latest/mgmt/managing-cluster-multi-az.html) +## Multi-AZ -Amazon Redshift supports multiple Availability Zones (Multi-AZ) deployments for provisioned RA3 clusters. By using Multi-AZ deployments, your Amazon Redshift data warehouse can continue operating in failure scenarios when an unexpected event happens in an Availability Zone. +Amazon Redshift supports [multiple Availability Zones (Multi-AZ) deployments]((https://docs.aws.amazon.com/redshift/latest/mgmt/managing-cluster-multi-az.html)) for provisioned RA3 clusters. +By using Multi-AZ deployments, your Amazon Redshift data warehouse can continue operating in failure scenarios when an unexpected event happens in an Availability Zone. ```ts +declare const vpc: ec2.IVpc; + new redshift.Cluster(stack, 'Cluster', { masterUser: { masterUsername: 'admin', diff --git a/packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts b/packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts index e839fcc7937c0..f368c75b9c8a2 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts +++ b/packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts @@ -569,10 +569,10 @@ export class Cluster extends ClusterBase { if (props.multiAz) { if (!nodeType.startsWith('ra3')) { - throw new Error('Multi-AZ cluster is only supported for RA3 node types.'); + throw new Error(`Multi-AZ cluster is only supported for RA3 node types. got: ${nodeType}`); } if (clusterType === ClusterType.SINGLE_NODE) { - throw new Error('Multi-AZ cluster is not supported for single-node clusters.'); + throw new Error('Multi-AZ cluster is not supported for single-node clusters. got: `ClusterType.SINGLE_NODE`'); } } From ba254a9a3bc8f6d87810aa44cecac8afad53fabc Mon Sep 17 00:00:00 2001 From: kazuho cryer-shinozuka Date: Thu, 2 May 2024 20:09:07 +0900 Subject: [PATCH 12/15] Update packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts Co-authored-by: k.goto <24818752+go-to-k@users.noreply.github.com> --- packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts b/packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts index f368c75b9c8a2..a2b770bd5a4b5 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts +++ b/packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts @@ -569,7 +569,7 @@ export class Cluster extends ClusterBase { if (props.multiAz) { if (!nodeType.startsWith('ra3')) { - throw new Error(`Multi-AZ cluster is only supported for RA3 node types. got: ${nodeType}`); + throw new Error(`Multi-AZ cluster is only supported for RA3 node types, got: ${props.nodeType}`); } if (clusterType === ClusterType.SINGLE_NODE) { throw new Error('Multi-AZ cluster is not supported for single-node clusters. got: `ClusterType.SINGLE_NODE`'); From 61e786af2cf491e8cf2722d825f2867f0ca37404 Mon Sep 17 00:00:00 2001 From: kazuho cryer-shinozuka Date: Thu, 2 May 2024 22:25:58 +0900 Subject: [PATCH 13/15] Update packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts Co-authored-by: k.goto <24818752+go-to-k@users.noreply.github.com> --- packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts b/packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts index a2b770bd5a4b5..19d8c42386320 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts +++ b/packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts @@ -572,7 +572,7 @@ export class Cluster extends ClusterBase { throw new Error(`Multi-AZ cluster is only supported for RA3 node types, got: ${props.nodeType}`); } if (clusterType === ClusterType.SINGLE_NODE) { - throw new Error('Multi-AZ cluster is not supported for single-node clusters. got: `ClusterType.SINGLE_NODE`'); + throw new Error('Multi-AZ cluster is not supported for `clusterType` single-node'); } } From 13574d9c61e001ea981f7d6790a4721e2dad119e Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Thu, 2 May 2024 22:31:39 +0900 Subject: [PATCH 14/15] docs: update readme --- packages/@aws-cdk/aws-redshift-alpha/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/@aws-cdk/aws-redshift-alpha/README.md b/packages/@aws-cdk/aws-redshift-alpha/README.md index ea7e4499baed9..5f2e13a711d50 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/README.md +++ b/packages/@aws-cdk/aws-redshift-alpha/README.md @@ -561,6 +561,8 @@ cluster.addIamRole(role); Amazon Redshift supports [multiple Availability Zones (Multi-AZ) deployments]((https://docs.aws.amazon.com/redshift/latest/mgmt/managing-cluster-multi-az.html)) for provisioned RA3 clusters. By using Multi-AZ deployments, your Amazon Redshift data warehouse can continue operating in failure scenarios when an unexpected event happens in an Availability Zone. +To create a Multi-AZ cluster, set the `multiAz` property to `true` when creating the cluster. + ```ts declare const vpc: ec2.IVpc; From de290242b924a32a18715416fbbac1e3682e5604 Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Thu, 2 May 2024 22:38:45 +0900 Subject: [PATCH 15/15] fix: unit test --- packages/@aws-cdk/aws-redshift-alpha/test/cluster.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/cluster.test.ts b/packages/@aws-cdk/aws-redshift-alpha/test/cluster.test.ts index cd4496815bae1..cd4e4bfa04fa4 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/cluster.test.ts +++ b/packages/@aws-cdk/aws-redshift-alpha/test/cluster.test.ts @@ -657,7 +657,7 @@ describe('multi AZ cluster', () => { nodeType: NodeType.DS2_XLARGE, multiAz: true, }); - }).toThrow('Multi-AZ cluster is only supported for RA3 node types.'); + }).toThrow('Multi-AZ cluster is only supported for RA3 node types, got: ds2.xlarge'); }); test('throw error for single node cluster', () => { @@ -671,7 +671,7 @@ describe('multi AZ cluster', () => { multiAz: true, clusterType: ClusterType.SINGLE_NODE, }); - }).toThrow('Multi-AZ cluster is not supported for single-node clusters.'); + }).toThrow('Multi-AZ cluster is not supported for `clusterType` single-node'); }); });