From a12470696d7450971f1af58cdeb2413a87777b64 Mon Sep 17 00:00:00 2001 From: Kaizen Conroy <36202692+kaizencc@users.noreply.github.com> Date: Mon, 11 Sep 2023 17:51:47 -0400 Subject: [PATCH] chore(msk): integ test for zookeeper connect custom resource (#27102) Adding an integ test for this custom resource with our new rule that each custom resource needs at least one integ test. There is nothing to assert here, since the custom resource calls an AWS api to return a string. Asserting it with the same api call seems redundant. Instead, I'm going with supplying a cfnOutput to the console, which shows the string is zookeeper related. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- ...efaultTestDeployAssert731E1402.assets.json | 19 + ...aultTestDeployAssert731E1402.template.json | 36 + .../KafkaZookeeperTestStack.assets.json | 32 + .../KafkaZookeeperTestStack.template.json | 626 ++++++++++ .../index.js | 1 + .../cdk.out | 1 + .../integ.json | 12 + .../manifest.json | 315 +++++ .../tree.json | 1053 +++++++++++++++++ .../test/integ.cluster-zookeeper.ts | 41 + 10 files changed, 2136 insertions(+) create mode 100644 packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/KafkaZookeeperIntegTestDefaultTestDeployAssert731E1402.assets.json create mode 100644 packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/KafkaZookeeperIntegTestDefaultTestDeployAssert731E1402.template.json create mode 100644 packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/KafkaZookeeperTestStack.assets.json create mode 100644 packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/KafkaZookeeperTestStack.template.json create mode 100644 packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/asset.03adb2514e02907e0458bec59283658ec529425bd5df38e1194455c65dedf6ff/index.js create mode 100644 packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/cdk.out create mode 100644 packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/integ.json create mode 100644 packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/manifest.json create mode 100644 packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/tree.json create mode 100644 packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.ts diff --git a/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/KafkaZookeeperIntegTestDefaultTestDeployAssert731E1402.assets.json b/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/KafkaZookeeperIntegTestDefaultTestDeployAssert731E1402.assets.json new file mode 100644 index 0000000000000..43a448a2e0e30 --- /dev/null +++ b/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/KafkaZookeeperIntegTestDefaultTestDeployAssert731E1402.assets.json @@ -0,0 +1,19 @@ +{ + "version": "34.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "KafkaZookeeperIntegTestDefaultTestDeployAssert731E1402.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-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/KafkaZookeeperIntegTestDefaultTestDeployAssert731E1402.template.json b/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/KafkaZookeeperIntegTestDefaultTestDeployAssert731E1402.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/KafkaZookeeperIntegTestDefaultTestDeployAssert731E1402.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-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/KafkaZookeeperTestStack.assets.json b/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/KafkaZookeeperTestStack.assets.json new file mode 100644 index 0000000000000..5ed5a6901fdd7 --- /dev/null +++ b/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/KafkaZookeeperTestStack.assets.json @@ -0,0 +1,32 @@ +{ + "version": "34.0.0", + "files": { + "03adb2514e02907e0458bec59283658ec529425bd5df38e1194455c65dedf6ff": { + "source": { + "path": "asset.03adb2514e02907e0458bec59283658ec529425bd5df38e1194455c65dedf6ff", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "03adb2514e02907e0458bec59283658ec529425bd5df38e1194455c65dedf6ff.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "fc4b1fb965e9b49fa2317ca42c59074b627947bfbfa39f5ba7e12985b59869a9": { + "source": { + "path": "KafkaZookeeperTestStack.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "fc4b1fb965e9b49fa2317ca42c59074b627947bfbfa39f5ba7e12985b59869a9.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-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/KafkaZookeeperTestStack.template.json b/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/KafkaZookeeperTestStack.template.json new file mode 100644 index 0000000000000..32ef492514a3d --- /dev/null +++ b/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/KafkaZookeeperTestStack.template.json @@ -0,0 +1,626 @@ +{ + "Resources": { + "Vpc8378EB38": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "KafkaZookeeperTestStack/Vpc" + } + ] + } + }, + "VpcPublicSubnet1Subnet5C2D37C4": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.0.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "KafkaZookeeperTestStack/Vpc/PublicSubnet1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPublicSubnet1RouteTable6C95E38E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "KafkaZookeeperTestStack/Vpc/PublicSubnet1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPublicSubnet1RouteTableAssociation97140677": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + } + } + }, + "VpcPublicSubnet1DefaultRoute3DA9E72A": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ] + }, + "VpcPublicSubnet1EIPD7E02669": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "KafkaZookeeperTestStack/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1NATGateway4D7517AA": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet1EIPD7E02669", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "KafkaZookeeperTestStack/Vpc/PublicSubnet1" + } + ] + }, + "DependsOn": [ + "VpcPublicSubnet1DefaultRoute3DA9E72A", + "VpcPublicSubnet1RouteTableAssociation97140677" + ] + }, + "VpcPublicSubnet2Subnet691E08A3": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.64.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "KafkaZookeeperTestStack/Vpc/PublicSubnet2" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPublicSubnet2RouteTable94F7E489": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "KafkaZookeeperTestStack/Vpc/PublicSubnet2" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPublicSubnet2RouteTableAssociationDD5762D8": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + } + } + }, + "VpcPublicSubnet2DefaultRoute97F91067": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ] + }, + "VpcPublicSubnet2EIP3C605A87": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "KafkaZookeeperTestStack/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPublicSubnet2NATGateway9182C01D": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet2EIP3C605A87", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + }, + "Tags": [ + { + "Key": "Name", + "Value": "KafkaZookeeperTestStack/Vpc/PublicSubnet2" + } + ] + }, + "DependsOn": [ + "VpcPublicSubnet2DefaultRoute97F91067", + "VpcPublicSubnet2RouteTableAssociationDD5762D8" + ] + }, + "VpcPrivateSubnet1Subnet536B997A": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.128.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "KafkaZookeeperTestStack/Vpc/PrivateSubnet1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPrivateSubnet1RouteTableB2C5B500": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "KafkaZookeeperTestStack/Vpc/PrivateSubnet1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + } + } + }, + "VpcPrivateSubnet1DefaultRouteBE02A9ED": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + }, + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + } + } + }, + "VpcPrivateSubnet2Subnet3788AAA1": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.192.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "KafkaZookeeperTestStack/Vpc/PrivateSubnet2" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPrivateSubnet2RouteTableA678073B": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "KafkaZookeeperTestStack/Vpc/PrivateSubnet2" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + } + }, + "VpcPrivateSubnet2DefaultRoute060D2087": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet2NATGateway9182C01D" + }, + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + } + } + }, + "VpcIGWD7BA715C": { + "Type": "AWS::EC2::InternetGateway", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "KafkaZookeeperTestStack/Vpc" + } + ] + } + }, + "VpcVPCGWBF912B6E": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "InternetGatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "ClusterZookeeperSecurityGroupD3CFED03": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "MSK security group", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "ClusterZookeeper29ECF2D7": { + "Type": "AWS::MSK::Cluster", + "Properties": { + "BrokerNodeGroupInfo": { + "ClientSubnets": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + ], + "InstanceType": "kafka.m5.large", + "SecurityGroups": [ + { + "Fn::GetAtt": [ + "ClusterZookeeperSecurityGroupD3CFED03", + "GroupId" + ] + } + ], + "StorageInfo": { + "EBSStorageInfo": { + "VolumeSize": 1000 + } + } + }, + "ClusterName": "cluster-zookeeper", + "EncryptionInfo": { + "EncryptionInTransit": { + "ClientBroker": "TLS", + "InCluster": true + } + }, + "KafkaVersion": "3.4.0", + "LoggingInfo": { + "BrokerLogs": { + "CloudWatchLogs": { + "Enabled": false + }, + "Firehose": { + "Enabled": false + }, + "S3": { + "Enabled": false + } + } + }, + "NumberOfBrokerNodes": 2 + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterZookeeperZookeeperConnectDBC3303D": { + "Type": "Custom::AWS", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "AWS679f53fac002430cb0da5b7982bd22872D164C4C", + "Arn" + ] + }, + "Create": { + "Fn::Join": [ + "", + [ + "{\"service\":\"Kafka\",\"action\":\"describeCluster\",\"parameters\":{\"ClusterArn\":\"", + { + "Ref": "ClusterZookeeper29ECF2D7" + }, + "\"},\"physicalResourceId\":{\"id\":\"ZooKeeperConnectionString\"}}" + ] + ] + }, + "Update": { + "Fn::Join": [ + "", + [ + "{\"service\":\"Kafka\",\"action\":\"describeCluster\",\"parameters\":{\"ClusterArn\":\"", + { + "Ref": "ClusterZookeeper29ECF2D7" + }, + "\"},\"physicalResourceId\":{\"id\":\"ZooKeeperConnectionString\"}}" + ] + ] + }, + "InstallLatestAwsSdk": false + }, + "DependsOn": [ + "ClusterZookeeperZookeeperConnectCustomResourcePolicy762D4B4E" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterZookeeperZookeeperConnectCustomResourcePolicy762D4B4E": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "kafka:DescribeCluster", + "Effect": "Allow", + "Resource": { + "Ref": "ClusterZookeeper29ECF2D7" + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ClusterZookeeperZookeeperConnectCustomResourcePolicy762D4B4E", + "Roles": [ + { + "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" + } + ] + } + }, + "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ] + } + }, + "AWS679f53fac002430cb0da5b7982bd22872D164C4C": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "03adb2514e02907e0458bec59283658ec529425bd5df38e1194455c65dedf6ff.zip" + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2", + "Arn" + ] + }, + "Runtime": "nodejs18.x", + "Timeout": 120 + }, + "DependsOn": [ + "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" + ] + } + }, + "Outputs": { + "Zookeeper": { + "Value": { + "Fn::GetAtt": [ + "ClusterZookeeperZookeeperConnectDBC3303D", + "ClusterInfo.ZookeeperConnectString" + ] + } + } + }, + "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-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/asset.03adb2514e02907e0458bec59283658ec529425bd5df38e1194455c65dedf6ff/index.js b/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/asset.03adb2514e02907e0458bec59283658ec529425bd5df38e1194455c65dedf6ff/index.js new file mode 100644 index 0000000000000..e24d6abb5e19b --- /dev/null +++ b/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/asset.03adb2514e02907e0458bec59283658ec529425bd5df38e1194455c65dedf6ff/index.js @@ -0,0 +1 @@ +"use strict";var ue=Object.create;var k=Object.defineProperty;var pe=Object.getOwnPropertyDescriptor;var de=Object.getOwnPropertyNames;var me=Object.getPrototypeOf,ge=Object.prototype.hasOwnProperty;var d=(e,t)=>()=>(e&&(t=e(e=0)),t);var ye=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),S=(e,t)=>{for(var a in t)k(e,a,{get:t[a],enumerable:!0})},W=(e,t,a,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of de(t))!ge.call(e,i)&&i!==a&&k(e,i,{get:()=>t[i],enumerable:!(r=pe(t,i))||r.enumerable});return e};var M=(e,t,a)=>(a=e!=null?ue(me(e)):{},W(t||!e||!e.__esModule?k(a,"default",{value:e,enumerable:!0}):a,e)),f=e=>W(k({},"__esModule",{value:!0}),e);function fe(e){return Buffer.isBuffer(e)?e.toString("utf8"):ArrayBuffer.isView(e)?Se.decode(e.buffer):e}function B(e){function t(a,r=[]){return[].concat(...Object.keys(a).map(i=>{let o=fe(a[i]);return typeof o=="object"&&o!==null?t(o,r.concat([i])):{[r.concat([i]).join(".")]:o}}))}return Object.assign({},...t(e))}function V(e,t){return JSON.parse(JSON.stringify(e),(a,r)=>{switch(r){case P:return t;default:return r}})}function I(e,t){return Object.entries(e).reduce((a,[r,i])=>t(r)?{...a,[r]:i}:a,{})}function b(e,t,a,r,i){let o=JSON.stringify({Status:t,Reason:a,PhysicalResourceId:r,StackId:e.StackId,RequestId:e.RequestId,LogicalResourceId:e.LogicalResourceId,NoEcho:!1,Data:i});console.log("Responding",o);let n=require("url").parse(e.ResponseURL),s={hostname:n.hostname,path:n.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(o,"utf8")}};return new Promise((u,p)=>{try{let c=require("https").request(s,u);c.on("error",p),c.write(o),c.end()}catch(c){p(c)}})}function y(e){if(e)return JSON.parse(e)}function E(e){return function(t){for(let a of e)if(t.startsWith(a))return!0;return!1}}var P,Se,D=d(()=>{"use strict";P="PHYSICAL:RESOURCEID:",Se=new TextDecoder});var _={};S(_,{forceSdkInstallation:()=>be,handler:()=>Re});function be(){v=!1}function Ce(){console.log("Installing latest AWS SDK v2"),(0,q.execSync)("HOME=/tmp npm install aws-sdk@2 --production --no-package-lock --no-save --prefix /tmp"),v=!0}function he(e){let t=e.apiLoader;return Ae.forEach(({serviceName:a,apiVersions:r})=>{let i=a.toLowerCase();e.Service.hasService(i)?e.Service.addVersions(e[a],r):(t.services[i]={},e[a]=e.Service.defineService(i,r)),r.forEach(o=>{Object.defineProperty(t.services[i],o,{get:function(){let s=`aws-sdk-patch/${i}-${o}`,u=JSON.parse(w.readFileSync((0,L.join)(__dirname,`${s}.service.json`),"utf-8"));return u.paginators=JSON.parse(w.readFileSync((0,L.join)(__dirname,`${s}.paginators.json`),"utf-8")).pagination,u},enumerable:!0,configurable:!0})})}),e}async function Re(e,t){try{let a;if(!v&&e.ResourceProperties.InstallLatestAwsSdk==="true")try{Ce(),a=require("/tmp/node_modules/aws-sdk")}catch(s){console.log(`Failed to install latest AWS SDK v2: ${s}`),a=require("aws-sdk")}else v?a=require("/tmp/node_modules/aws-sdk"):a=require("aws-sdk");try{a=he(a)}catch(s){console.log(`Failed to patch AWS SDK: ${s}. Proceeding with the installed copy.`)}console.log(JSON.stringify({...e,ResponseURL:"..."})),console.log("AWS SDK VERSION: "+a.VERSION),e.ResourceProperties.Create=y(e.ResourceProperties.Create),e.ResourceProperties.Update=y(e.ResourceProperties.Update),e.ResourceProperties.Delete=y(e.ResourceProperties.Delete);let r;switch(e.RequestType){case"Create":r=e.ResourceProperties.Create?.physicalResourceId?.id??e.ResourceProperties.Update?.physicalResourceId?.id??e.ResourceProperties.Delete?.physicalResourceId?.id??e.LogicalResourceId;break;case"Update":case"Delete":r=e.ResourceProperties[e.RequestType]?.physicalResourceId?.id??e.PhysicalResourceId;break}let i={},o={},n=e.ResourceProperties[e.RequestType];if(n){let s;if(n.assumedRoleArn){let p=new Date().getTime(),c={RoleArn:n.assumedRoleArn,RoleSessionName:`${p}-${r}`.substring(0,64)};s=new a.ChainableTemporaryCredentials({params:c,stsConfig:{stsRegionalEndpoints:"regional"}})}if(!Object.prototype.hasOwnProperty.call(a,n.service))throw Error(`Service ${n.service} does not exist in AWS SDK version ${a.VERSION}.`);let u=new a[n.service]({apiVersion:n.apiVersion,credentials:s,region:n.region});try{let p=await u[n.action](n.parameters&&V(n.parameters,r)).promise();i={apiVersion:u.config.apiVersion,region:u.config.region,...B(p)};let c;n.outputPath?c=[n.outputPath]:n.outputPaths&&(c=n.outputPaths),c?o=I(i,E(c)):o=i}catch(p){if(!n.ignoreErrorCodesMatching||!new RegExp(n.ignoreErrorCodesMatching).test(p.code))throw p}n.physicalResourceId?.responsePath&&(r=i[n.physicalResourceId.responsePath])}await b(e,"SUCCESS","OK",r,o)}catch(a){console.log(a),await b(e,"FAILED",a.message||"Internal Error",t.logStreamName,{})}}var q,w,L,v,Ae,N=d(()=>{"use strict";q=require("child_process"),w=M(require("fs")),L=require("path");D();v=!1;Ae=[]});var j,G=d(()=>{"use strict";j={acm:{exportcertificate:["Passphrase"],importcertificate:["Certificate","CertificateChain","PrivateKey"]},"acm-pca":{importcertificateauthoritycertificate:["Certificate","CertificateChain"],issuecertificate:["Csr"]},apigateway:{importapikeys:["body"],importdocumentationparts:["body"],importrestapi:["body"],putrestapi:["body"],posttoconnection:["Data"]},appconfig:{createhostedconfigurationversion:["Content"]},appsync:{startschemacreation:["definition"]},awsmobilehubservice:{createproject:["contents"],updateproject:["contents"]},"backup-storage":{notifyobjectcomplete:["MetadataBlob"],putchunk:["Data"],putobject:["InlineChunk"]},clouddirectory:{addfacettoobject:["ObjectAttributeList.*.Value.BinaryValue"],attachtypedlink:["Attributes.*.Value.BinaryValue"],batchread:["Operations.*.GetLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues.*.Value.BinaryValue","Operations.*.ListIncomingTypedLinks.FilterAttributeRanges.*.Range.EndValue.BinaryValue","Operations.*.ListIncomingTypedLinks.FilterAttributeRanges.*.Range.StartValue.BinaryValue","Operations.*.ListIndex.RangesOnIndexedValues.*.Range.EndValue.BinaryValue","Operations.*.ListIndex.RangesOnIndexedValues.*.Range.StartValue.BinaryValue","Operations.*.ListOutgoingTypedLinks.FilterAttributeRanges.*.Range.EndValue.BinaryValue","Operations.*.ListOutgoingTypedLinks.FilterAttributeRanges.*.Range.StartValue.BinaryValue"],batchwrite:["Operations.*.AddFacetToObject.ObjectAttributeList.*.Value.BinaryValue","Operations.*.AttachTypedLink.Attributes.*.Value.BinaryValue","Operations.*.CreateObject.ObjectAttributeList.*.Value.BinaryValue","Operations.*.DetachTypedLink.TypedLinkSpecifier.IdentityAttributeValues.*.Value.BinaryValue","Operations.*.UpdateLinkAttributes.AttributeUpdates.*.AttributeAction.AttributeUpdateValue.BinaryValue","Operations.*.UpdateLinkAttributes.TypedLinkSpecifier.IdentityAttributeValues.*.Value.BinaryValue","Operations.*.UpdateObjectAttributes.AttributeUpdates.*.ObjectAttributeAction.ObjectAttributeUpdateValue.BinaryValue"],createfacet:["Attributes.*.AttributeDefinition.DefaultValue.BinaryValue"],createobject:["ObjectAttributeList.*.Value.BinaryValue"],createtypedlinkfacet:["Facet.Attributes.*.DefaultValue.BinaryValue"],detachtypedlink:["TypedLinkSpecifier.IdentityAttributeValues.*.Value.BinaryValue"],getlinkattributes:["TypedLinkSpecifier.IdentityAttributeValues.*.Value.BinaryValue"],listincomingtypedlinks:["FilterAttributeRanges.*.Range.EndValue.BinaryValue","FilterAttributeRanges.*.Range.StartValue.BinaryValue"],listindex:["RangesOnIndexedValues.*.Range.EndValue.BinaryValue","RangesOnIndexedValues.*.Range.StartValue.BinaryValue"],listoutgoingtypedlinks:["FilterAttributeRanges.*.Range.EndValue.BinaryValue","FilterAttributeRanges.*.Range.StartValue.BinaryValue"],updatefacet:["AttributeUpdates.*.Attribute.AttributeDefinition.DefaultValue.BinaryValue"],updatelinkattributes:["AttributeUpdates.*.AttributeAction.AttributeUpdateValue.BinaryValue","TypedLinkSpecifier.IdentityAttributeValues.*.Value.BinaryValue"],updateobjectattributes:["AttributeUpdates.*.ObjectAttributeAction.ObjectAttributeUpdateValue.BinaryValue"],updatetypedlinkfacet:["AttributeUpdates.*.Attribute.DefaultValue.BinaryValue"]},cloudfront:{createfunction:["FunctionCode"],testfunction:["EventObject"],updatefunction:["FunctionCode"]},cloudsearch:{uploaddocuments:["documents"]},codeartifact:{publishpackageversion:["assetContent"]},codecommit:{createcommit:["putFiles.*.fileContent"],createunreferencedmergecommit:["conflictResolution.replaceContents.*.content"],mergebranchesbysquash:["conflictResolution.replaceContents.*.content"],mergebranchesbythreeway:["conflictResolution.replaceContents.*.content"],mergepullrequestbysquash:["conflictResolution.replaceContents.*.content"],mergepullrequestbythreeway:["conflictResolution.replaceContents.*.content"],putfile:["fileContent"]},"cognito-idp":{setuicustomization:["ImageFile"]},comprehend:{classifydocument:["Bytes"],detectentities:["Bytes"]},datasync:{createlocationhdfs:["KerberosKeytab","KerberosKrb5Conf"],createlocationobjectstorage:["ServerCertificate"],updatelocationhdfs:["KerberosKeytab","KerberosKrb5Conf"],updatelocationobjectstorage:["ServerCertificate"]},dms:{importcertificate:["CertificateWallet"]},dynamodb:{batchexecutestatement:["Statements.*.Parameters.*.B","Statements.*.Parameters.*.BS.*"],batchgetitem:["RequestItems.*.Keys.*.*.B","RequestItems.*.Keys.*.*.BS.*"],batchwriteitem:["RequestItems.*.*.DeleteRequest.Key.*.B","RequestItems.*.*.DeleteRequest.Key.*.BS.*","RequestItems.*.*.PutRequest.Item.*.B","RequestItems.*.*.PutRequest.Item.*.BS.*"],deleteitem:["Expected.*.AttributeValueList.*.B","Expected.*.AttributeValueList.*.BS.*","Expected.*.Value.B","Expected.*.Value.BS.*","ExpressionAttributeValues.*.B","ExpressionAttributeValues.*.BS.*","Key.*.B","Key.*.BS.*"],executestatement:["Parameters.*.B","Parameters.*.BS.*"],executetransaction:["TransactStatements.*.Parameters.*.B","TransactStatements.*.Parameters.*.BS.*"],getitem:["Key.*.B","Key.*.BS.*"],putitem:["Expected.*.AttributeValueList.*.B","Expected.*.AttributeValueList.*.BS.*","Expected.*.Value.B","Expected.*.Value.BS.*","ExpressionAttributeValues.*.B","ExpressionAttributeValues.*.BS.*","Item.*.B","Item.*.BS.*"],query:["ExclusiveStartKey.*.B","ExclusiveStartKey.*.BS.*","ExpressionAttributeValues.*.B","ExpressionAttributeValues.*.BS.*","KeyConditions.*.AttributeValueList.*.B","KeyConditions.*.AttributeValueList.*.BS.*","QueryFilter.*.AttributeValueList.*.B","QueryFilter.*.AttributeValueList.*.BS.*"],scan:["ExclusiveStartKey.*.B","ExclusiveStartKey.*.BS.*","ExpressionAttributeValues.*.B","ExpressionAttributeValues.*.BS.*","ScanFilter.*.AttributeValueList.*.B","ScanFilter.*.AttributeValueList.*.BS.*"],transactgetitems:["TransactItems.*.Get.Key.*.B","TransactItems.*.Get.Key.*.BS.*"],transactwriteitems:["TransactItems.*.ConditionCheck.ExpressionAttributeValues.*.B","TransactItems.*.ConditionCheck.ExpressionAttributeValues.*.BS.*","TransactItems.*.ConditionCheck.Key.*.B","TransactItems.*.ConditionCheck.Key.*.BS.*","TransactItems.*.Delete.ExpressionAttributeValues.*.B","TransactItems.*.Delete.ExpressionAttributeValues.*.BS.*","TransactItems.*.Delete.Key.*.B","TransactItems.*.Delete.Key.*.BS.*","TransactItems.*.Put.ExpressionAttributeValues.*.B","TransactItems.*.Put.ExpressionAttributeValues.*.BS.*","TransactItems.*.Put.Item.*.B","TransactItems.*.Put.Item.*.BS.*","TransactItems.*.Update.ExpressionAttributeValues.*.B","TransactItems.*.Update.ExpressionAttributeValues.*.BS.*","TransactItems.*.Update.Key.*.B","TransactItems.*.Update.Key.*.BS.*"],updateitem:["AttributeUpdates.*.Value.B","AttributeUpdates.*.Value.BS.*","Expected.*.AttributeValueList.*.B","Expected.*.AttributeValueList.*.BS.*","Expected.*.Value.B","Expected.*.Value.BS.*","ExpressionAttributeValues.*.B","ExpressionAttributeValues.*.BS.*","Key.*.B","Key.*.BS.*"]},ebs:{putsnapshotblock:["BlockData"]},ec2:{bundleinstance:["Storage.S3.UploadPolicy"],importkeypair:["PublicKeyMaterial"],modifyinstanceattribute:["UserData.Value"]},ecr:{uploadlayerpart:["layerPartBlob"]},"ecr-public":{createrepository:["catalogData.logoImageBlob"],putrepositorycatalogdata:["catalogData.logoImageBlob"],uploadlayerpart:["layerPartBlob"]},firehose:{putrecord:["Record.Data"],putrecordbatch:["Records.*.Data"]},frauddetector:{geteventprediction:["externalModelEndpointDataBlobs.*.byteBuffer"]},gamelift:{createscript:["ZipFile"],updatescript:["ZipFile"]},gamesparks:{importgameconfiguration:["ImportSource.File"]},glacier:{uploadarchive:["body"],uploadmultipartpart:["body"]},glue:{updatecolumnstatisticsforpartition:["ColumnStatisticsList.*.StatisticsData.DecimalColumnStatisticsData.MaximumValue.UnscaledValue","ColumnStatisticsList.*.StatisticsData.DecimalColumnStatisticsData.MinimumValue.UnscaledValue"],updatecolumnstatisticsfortable:["ColumnStatisticsList.*.StatisticsData.DecimalColumnStatisticsData.MaximumValue.UnscaledValue","ColumnStatisticsList.*.StatisticsData.DecimalColumnStatisticsData.MinimumValue.UnscaledValue"]},greengrass:{createcomponentversion:["inlineRecipe"]},iot:{createotaupdate:["files.*.codeSigning.customCodeSigning.signature.inlineDocument"],testinvokeauthorizer:["mqttContext.password"]},iotanalytics:{batchputmessage:["messages.*.payload"],runpipelineactivity:["payloads.*"]},iotdata:{publish:["payload"],updatethingshadow:["payload"]},ioteventsdata:{batchputmessage:["messages.*.payload"]},iotsitewise:{createportal:["portalLogoImageFile.data"],updateportal:["portalLogoImage.file.data"]},iotwireless:{updateresourceposition:["GeoJsonPayload"]},kafka:{createconfiguration:["ServerProperties"],updateconfiguration:["ServerProperties"]},kendra:{batchputdocument:["Documents.*.Blob"]},kinesis:{putrecord:["Data"],putrecords:["Records.*.Data"]},kinesisanalytics:{createapplication:["ApplicationConfiguration.ApplicationCodeConfiguration.CodeContent.ZipFileContent"],updateapplication:["ApplicationConfigurationUpdate.ApplicationCodeConfigurationUpdate.CodeContentUpdate.ZipFileContentUpdate"]},kms:{decrypt:["CiphertextBlob","Recipient.AttestationDocument"],encrypt:["Plaintext"],generatedatakey:["Recipient.AttestationDocument"],generatedatakeypair:["Recipient.AttestationDocument"],generatemac:["Message"],generaterandom:["Recipient.AttestationDocument"],importkeymaterial:["EncryptedKeyMaterial","ImportToken"],reencrypt:["CiphertextBlob"],sign:["Message"],verify:["Message","Signature"],verifymac:["Mac","Message"]},lambda:{createfunction:["Code.ZipFile"],invoke:["Payload"],invokeasync:["InvokeArgs"],invokewithresponsestream:["Payload"],publishlayerversion:["Content.ZipFile"],updatefunctioncode:["ZipFile"]},lex:{startimport:["payload"],postcontent:["inputStream"],recognizeutterance:["inputStream"],startconversation:["requestEventStream.AudioInputEvent.audioChunk"]},lookoutvision:{detectanomalies:["Body"],updatedatasetentries:["Changes"]},mediastore:{putobject:["Body"]},"medical-imaging":{updateimagesetmetadata:["updateImageSetMetadataUpdates.DICOMUpdates.removableAttributes","updateImageSetMetadataUpdates.DICOMUpdates.updatableAttributes"]},mobiletargeting:{sendmessages:["MessageRequest.MessageConfiguration.EmailMessage.RawEmail.Data"],sendusersmessages:["SendUsersMessageRequest.MessageConfiguration.EmailMessage.RawEmail.Data"]},qldb:{sendcommand:["CommitTransaction.CommitDigest","ExecuteStatement.Parameters.*.IonBinary"]},quicksight:{startassetbundleimportjob:["AssetBundleImportSource.Body"]},"rds-data":{batchexecutestatement:["parameterSets.*.*.value.blobValue"],executestatement:["parameters.*.value.blobValue"]},rekognition:{comparefaces:["SourceImage.Bytes","TargetImage.Bytes"],detectcustomlabels:["Image.Bytes"],detectfaces:["Image.Bytes"],detectlabels:["Image.Bytes"],detectmoderationlabels:["Image.Bytes"],detectprotectiveequipment:["Image.Bytes"],detecttext:["Image.Bytes"],indexfaces:["Image.Bytes"],recognizecelebrities:["Image.Bytes"],searchfacesbyimage:["Image.Bytes"],searchusersbyimage:["Image.Bytes"],updatedatasetentries:["Changes.GroundTruth"],startfacelivenesssession:["LivenessRequestStream.VideoEvent.VideoChunk"]},s3:{putobject:["Body"],uploadpart:["Body"],writegetobjectresponse:["Body"]},sagemaker:{invokeendpoint:["Body"],invokeendpointwithresponsestream:["Body"]},secretsmanager:{createsecret:["SecretBinary"],putsecretvalue:["SecretBinary"],updatesecret:["SecretBinary"]},ses:{createdeliverabilitytestreport:["Content.Raw.Data","Content.Raw.Data"],sendemail:["Content.Raw.Data","Content.Raw.Data"],sendrawemail:["RawMessage.Data"]},signer:{signpayload:["payload"]},sns:{publish:["MessageAttributes.*.BinaryValue"],publishbatch:["PublishBatchRequestEntries.*.MessageAttributes.*.BinaryValue"]},sqs:{sendmessage:["MessageAttributes.*.BinaryListValues.*","MessageAttributes.*.BinaryValue","MessageSystemAttributes.*.BinaryListValues.*","MessageSystemAttributes.*.BinaryValue"],sendmessagebatch:["Entries.*.MessageAttributes.*.BinaryListValues.*","Entries.*.MessageAttributes.*.BinaryValue","Entries.*.MessageSystemAttributes.*.BinaryListValues.*","Entries.*.MessageSystemAttributes.*.BinaryValue"]},ssm:{registertaskwithmaintenancewindow:["TaskInvocationParameters.Lambda.Payload"],updatemaintenancewindowtask:["TaskInvocationParameters.Lambda.Payload"]},support:{addattachmentstoset:["attachments.*.data"]},synthetics:{createcanary:["Code.ZipFile"],updatecanary:["Code.ZipFile"]},textract:{analyzedocument:["Document.Bytes"],analyzeexpense:["Document.Bytes"],analyzeid:["DocumentPages.*.Bytes"],detectdocumenttext:["Document.Bytes"]},transcribe:{startcallanalyticsstreamtranscription:["AudioStream.AudioEvent.AudioChunk"],startmedicalstreamtranscription:["AudioStream.AudioEvent.AudioChunk"],startstreamtranscription:["AudioStream.AudioEvent.AudioChunk"]},translate:{importterminology:["TerminologyData.File"],translatedocument:["Document.Content"]},waf:{updatebytematchset:["Updates.*.ByteMatchTuple.TargetString"]},"waf-regional":{updatebytematchset:["Updates.*.ByteMatchTuple.TargetString"]},wafv2:{checkcapacity:["Rules.*.Statement.ByteMatchStatement.SearchString"],createrulegroup:["Rules.*.Statement.ByteMatchStatement.SearchString"],createwebacl:["Rules.*.Statement.ByteMatchStatement.SearchString"],updaterulegroup:["Rules.*.Statement.ByteMatchStatement.SearchString"],updatewebacl:["Rules.*.Statement.ByteMatchStatement.SearchString"]},workspaces:{importclientbranding:["DeviceTypeAndroid.Logo","DeviceTypeIos.Logo","DeviceTypeIos.Logo2x","DeviceTypeIos.Logo3x","DeviceTypeLinux.Logo","DeviceTypeOsx.Logo","DeviceTypeWeb.Logo","DeviceTypeWindows.Logo"]}}});var $={};S($,{coerceApiParametersToUint8Array:()=>ke,coerceToUint8Array:()=>A});function ke(e,t,a={}){let r=j?.[e.toLowerCase()]?.[t.toLowerCase()]??[];for(let i of r)A(a,i.split("."));return a}function A(e,t){return t.length===0?Be(e):t[0]==="*"?Array.isArray(e)?e.map(a=>A(a,t.slice(1))):e&&typeof e=="object"?Object.fromEntries(Object.entries(e).map(([a,r])=>[a,A(r,t.slice(1))])):e:(e&&typeof e=="object"&&t[0]in e&&(e[t[0]]=A(e[t[0]],t.slice(1))),e)}function Be(e){return e instanceof Uint8Array?e:typeof e=="string"||typeof e=="number"?new TextEncoder().encode(e.toString()):e}var H=d(()=>{"use strict";G()});var z={};S(z,{findV3ClientConstructor:()=>T});function T(e){let[t,a]=Object.entries(e).find(([r])=>r.endsWith("Client")&&r!=="__Client");return a}var x=d(()=>{"use strict"});var Q,Z=d(()=>{"use strict";Q=["ACM","ACMPCA","APIGateway","ARCZonalShift","AccessAnalyzer","Account","AlexaForBusiness","Amp","Amplify","AmplifyBackend","AmplifyUIBuilder","ApiGatewayManagementApi","ApiGatewayV2","AppConfig","AppConfigData","AppIntegrations","AppMesh","AppRunner","AppStream","AppSync","Appflow","ApplicationAutoScaling","ApplicationCostProfiler","ApplicationInsights","Athena","AuditManager","AugmentedAIRuntime","AutoScaling","AutoScalingPlans","Backup","BackupGateway","BackupStorage","Batch","Billingconductor","Braket","Budgets","CUR","Chime","ChimeSDKIdentity","ChimeSDKMediaPipelines","ChimeSDKMeetings","ChimeSDKMessaging","ChimeSDKVoice","Cloud9","CloudControl","CloudDirectory","CloudFormation","CloudFront","CloudHSM","CloudHSMV2","CloudSearch","CloudSearchDomain","CloudTrail","CloudWatch","CloudWatchEvents","CloudWatchLogs","CodeArtifact","CodeBuild","CodeCatalyst","CodeCommit","CodeDeploy","CodeGuruProfiler","CodeGuruReviewer","CodePipeline","CodeStar","CodeStarNotifications","CodeStarconnections","CognitoIdentity","CognitoIdentityServiceProvider","CognitoSync","Comprehend","ComprehendMedical","ComputeOptimizer","ConfigService","Connect","ConnectCampaigns","ConnectCases","ConnectContactLens","ConnectParticipant","ControlTower","CostExplorer","CustomerProfiles","DAX","DLM","DMS","DataBrew","DataExchange","DataPipeline","DataSync","Detective","DevOpsGuru","DeviceFarm","DirectConnect","DirectoryService","Discovery","DocDB","DocDBElastic","Drs","DynamoDB","DynamoDBStreams","EBS","EC2","EC2InstanceConnect","ECR","ECRPUBLIC","ECS","EFS","EKS","ELB","ELBv2","EMR","EMRServerless","EMRcontainers","ES","ElastiCache","ElasticBeanstalk","ElasticInference","ElasticTranscoder","EventBridge","Evidently","FMS","FSx","Finspace","Finspacedata","Firehose","Fis","ForecastQueryService","ForecastService","FraudDetector","GameLift","GameSparks","Glacier","GlobalAccelerator","Glue","Grafana","Greengrass","GreengrassV2","GroundStation","GuardDuty","Health","HealthLake","Honeycode","IAM","IVS","IdentityStore","Imagebuilder","Inspector","Inspector2","IoT1ClickDevicesService","IoT1ClickProjects","IoTAnalytics","IoTEvents","IoTEventsData","IoTFleetHub","IoTFleetWise","IoTJobsDataPlane","IoTRoboRunner","IoTSecureTunneling","IoTSiteWise","IoTThingsGraph","IoTTwinMaker","IoTWireless","Iot","IotData","IotDeviceAdvisor","Ivschat","KMS","Kafka","KafkaConnect","Kendra","Keyspaces","Kinesis","KinesisAnalytics","KinesisAnalyticsV2","KinesisVideo","KinesisVideoArchivedMedia","KinesisVideoMedia","KinesisVideoSignalingChannels","KinesisVideoWebRTCStorage","LakeFormation","Lambda","LexModelBuildingService","LexModelsV2","LexRuntime","LexRuntimeV2","LicenseManager","LicenseManagerLinuxSubscriptions","LicenseManagerUserSubscriptions","Lightsail","Location","LookoutEquipment","LookoutMetrics","LookoutVision","M2","MQ","MTurk","MWAA","MachineLearning","Macie","Macie2","ManagedBlockchain","MarketplaceCatalog","MarketplaceCommerceAnalytics","MarketplaceEntitlementService","MarketplaceMetering","MediaConnect","MediaConvert","MediaLive","MediaPackage","MediaPackageVod","MediaStore","MediaStoreData","MediaTailor","MemoryDB","Mgn","MigrationHub","MigrationHubConfig","MigrationHubOrchestrator","MigrationHubRefactorSpaces","MigrationHubStrategy","Mobile","Neptune","NetworkFirewall","NetworkManager","Nimble","OAM","Omics","OpenSearch","OpenSearchServerless","OpsWorks","OpsWorksCM","Organizations","Outposts","PI","Panorama","Personalize","PersonalizeEvents","PersonalizeRuntime","Pinpoint","PinpointEmail","PinpointSMSVoice","PinpointSMSVoiceV2","Pipes","Polly","Pricing","PrivateNetworks","Proton","QLDB","QLDBSession","QuickSight","RAM","RDS","RDSDataService","RUM","Rbin","Redshift","RedshiftData","RedshiftServerless","Rekognition","Resiliencehub","ResourceExplorer2","ResourceGroups","ResourceGroupsTaggingAPI","RoboMaker","RolesAnywhere","Route53","Route53Domains","Route53RecoveryCluster","Route53RecoveryControlConfig","Route53RecoveryReadiness","Route53Resolver","S3","S3Control","S3Outposts","SES","SESV2","SMS","SNS","SQS","SSM","SSMContacts","SSMIncidents","SSO","SSOAdmin","SSOOIDC","STS","SWF","SageMaker","SageMakerFeatureStoreRuntime","SageMakerGeospatial","SageMakerMetrics","SageMakerRuntime","SagemakerEdge","SavingsPlans","Scheduler","Schemas","SecretsManager","SecurityHub","SecurityLake","ServerlessApplicationRepository","ServiceCatalog","ServiceCatalogAppRegistry","ServiceDiscovery","ServiceQuotas","Shield","Signer","SimSpaceWeaver","SnowDeviceManagement","Snowball","SsmSap","StepFunctions","StorageGateway","Support","SupportApp","Synthetics","Textract","TimestreamQuery","TimestreamWrite","TranscribeService","Transfer","Translate","VoiceID","WAF","WAFRegional","WAFV2","WellArchitected","Wisdom","WorkDocs","WorkLink","WorkMail","WorkMailMessageFlow","WorkSpaces","WorkSpacesWeb","XRay"]});var O,J=d(()=>{"use strict";Z();O={...Q.reduce((e,t)=>({...e,[t]:`client-${t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}`.replace("-chime-sdk","-chime-sdk-").replace("client-amplify-","client-amplify").replace("client-cloud-","client-cloud").replace("client-code-","client-code").replace("client-connect-","client-connect").replace("client-data-","client-data").replace("client-io-t","client-iot-").replace("client-iot-fleet-","client-iotfleet").replace("client-lookout-","client-lookout").replace("client-media-","client-media").replace("client-migration-hub-","client-migrationhub").replace("client-pinpoint-sms","client-pinpoint-sms-").replace("client-route53","client-route53-").replace("client-sage-maker","client-sagemaker").replace("client-security-","client-security").replace("client-work-","client-work")}),{}),AccessAnalyzer:"client-accessanalyzer",ACMPCA:"client-acm-pca",APIGateway:"client-api-gateway",ApiGatewayManagementApi:"client-apigatewaymanagementapi",ApiGatewayV2:"client-apigatewayv2",AppConfig:"client-appconfig",AppConfigData:"client-appconfigdata",AppIntegrations:"client-appintegrations",AppRunner:"client-apprunner",AppStream:"client-appstream",AppSync:"client-appsync",ApplicationCostProfiler:"client-applicationcostprofiler",ARCZonalShift:"client-arc-zonal-shift",AugmentedAIRuntime:"client-sage-maker-a2iruntime",AuditManager:"client-auditmanager",BackupStorage:"client-backupstorage",CUR:"client-cost-and-usage-report-service",CloudHSMV2:"client-cloudhsm-v2",CodeGuruProfiler:"client-codeguruprofiler",CodeStarconnections:"client-codestar-connections",CognitoIdentityServiceProvider:"client-cognito-identity-provider",ComprehendMedical:"client-comprehendmedical",ConnectContactLens:"client-connect-contact-lens",ControlTower:"client-controltower",DMS:"client-database-migration-service",DataPipeline:"client-data-pipeline",Discovery:"client-application-discovery-service",DevOpsGuru:"client-devops-guru",DynamoDB:"client-dynamodb",DynamoDBStreams:"client-dynamodb-streams",DocDB:"client-docdb",DocDBElastic:"client-docdb-elastic",EC2InstanceConnect:"client-ec2-instance-connect",ECRPUBLIC:"client-ecr-public",ELB:"client-elastic-load-balancing",ELBv2:"client-elastic-load-balancing-v2",ElastiCache:"client-elasticache",EMRcontainers:"client-emr-containers",EMRServerless:"client-emr-serverless",ES:"client-elasticsearch-service",EventBridge:"client-eventbridge",Finspacedata:"client-finspace-data",ForecastQueryService:"client-forecastquery",ForecastService:"client-forecast",FraudDetector:"client-frauddetector",GameLift:"client-gamelift",GameSparks:"client-gamesparks",GreengrassV2:"client-greengrassv2",GroundStation:"client-groundstation",GuardDuty:"client-guardduty",HealthLake:"client-healthlake",IdentityStore:"client-identitystore",IoTAnalytics:"client-iotanalytics",IotData:"client-iot-data-plane",IotDeviceAdvisor:"client-iotdeviceadvisor",IoTSecureTunneling:"client-iotsecuretunneling",IoTSiteWise:"client-iotsitewise",IoTThingsGraph:"client-iotthingsgraph",IoTTwinMaker:"client-iottwinmaker",IoTRoboRunner:"client-iot-roborunner",KafkaConnect:"client-kafkaconnect",KinesisVideoSignalingChannels:"client-kinesis-video-signaling",KinesisVideoWebRTCStorage:"client-kinesis-video-webrtc-storage",LakeFormation:"client-lakeformation",LexRuntime:"client-lex-runtime-service",ManagedBlockchain:"client-managedblockchain",MigrationHubConfig:"client-migrationhub-config",MigrationHubRefactorSpaces:"client-migration-hub-refactor-spaces",NetworkManager:"client-networkmanager",OpenSearch:"client-opensearch",OpenSearchServerless:"client-opensearchserverless",OpsWorks:"client-opsworks",OpsWorksCM:"client-opsworkscm",PrivateNetworks:"client-privatenetworks",QLDBSession:"client-qldb-session",QuickSight:"client-quicksight",ResourceExplorer2:"client-resource-explorer-2",RDSDataService:"client-rds-data",RoboMaker:"client-robomaker",RolesAnywhere:"client-rolesanywhere",Route53:"client-route-53",Route53Domains:"client-route-53-domains",Route53Resolver:"client-route53resolver",S3Control:"client-s3-control",SageMakerFeatureStoreRuntime:"client-sagemaker-featurestore-runtime",SavingsPlans:"client-savingsplans",SecurityHub:"client-securityhub",ServerlessApplicationRepository:"client-serverlessapplicationrepository",ServiceCatalogAppRegistry:"client-service-catalog-appregistry",ServiceDiscovery:"client-servicediscovery",SimSpaceWeaver:"client-simspaceweaver",SSMContacts:"client-ssm-contacts",SSMIncidents:"client-ssm-incidents",SSOAdmin:"client-sso-admin",SSOOIDC:"client-sso-oidc",StepFunctions:"client-sfn",TranscribeService:"client-transcribe",WAFRegional:"client-waf-regional",WellArchitected:"client-wellarchitected",WorkMailMessageFlow:"client-workmailmessageflow"}});var Y={};S(Y,{getV3ClientPackageName:()=>F});var F,U=d(()=>{"use strict";J();F=e=>{if(e in O)return`@aws-sdk/${O[e]}`;throw new Error(`Client '${e}' is either deprecated or newly added. Please consider using the v3 package format (@aws-sdk/client-xxx).`)}});var X={};S(X,{getV3Client:()=>Ie,getV3Command:()=>Ee,loadV3ClientPackage:()=>Ve});function Ve(e){let t=e.startsWith("@aws-sdk/")?e:F(e);try{let a=require(t),{version:r}=require(t+"/package.json");return{service:t.replace("@aws-sdk/client-",""),pkg:a,packageName:t,packageVersion:r}}catch{throw Error(`Service ${e} client package with name '${t}' does not exist.`)}}function Ie(e,t={}){try{let a=T(e.pkg);return new a(t)}catch{throw Error(`No client constructor found within package: ${e.packageName}`)}}function Ee(e,t){let a=t.endsWith("Command")?t:`${t}Command`,r=Object.entries(e.pkg).find(([i])=>i.toLowerCase()===a.toLowerCase())?.[1];if(!r)throw new Error(`Unable to find command named: ${a} for api: ${t} in service package`);return r}var ee=d(()=>{"use strict";x();U()});var te=ye(l=>{"use strict";var De=l&&l.__createBinding||(Object.create?function(e,t,a,r){r===void 0&&(r=a);var i=Object.getOwnPropertyDescriptor(t,a);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[a]}}),Object.defineProperty(e,r,i)}:function(e,t,a,r){r===void 0&&(r=a),e[r]=t[a]}),ve=l&&l.__exportStar||function(e,t){for(var a in e)a!=="default"&&!Object.prototype.hasOwnProperty.call(t,a)&&De(t,e,a)};Object.defineProperty(l,"__esModule",{value:!0});l.getV3ClientPackageName=l.findV3ClientConstructor=l.coerceApiParametersToUint8Array=void 0;var Me=(H(),f($));Object.defineProperty(l,"coerceApiParametersToUint8Array",{enumerable:!0,get:function(){return Me.coerceApiParametersToUint8Array}});var Pe=(x(),f(z));Object.defineProperty(l,"findV3ClientConstructor",{enumerable:!0,get:function(){return Pe.findV3ClientConstructor}});var we=(U(),f(Y));Object.defineProperty(l,"getV3ClientPackageName",{enumerable:!0,get:function(){return we.getV3ClientPackageName}});ve((ee(),f(X)),l)});var ie={};S(ie,{forceSdkInstallation:()=>Le,handler:()=>Oe});function Le(){h={}}function Te(e){console.log(`Installing latest AWS SDK v3: ${e}`),(0,ae.execSync)(`NPM_CONFIG_UPDATE_NOTIFIER=false HOME=/tmp npm install ${e} --omit=dev --no-package-lock --no-save --prefix /tmp`),h={...h,[e]:!0}}async function xe(e,t){let a;try{if(!h[e]&&t==="true")try{Te(e),a=require(`/tmp/node_modules/${e}`)}catch(r){return console.log(`Failed to install latest AWS SDK v3. Falling back to pre-installed version. Error: ${r}`),require(e)}else h[e]?a=require(`/tmp/node_modules/${e}`):a=require(e)}catch{throw Error(`Package ${e} does not exist.`)}return a}async function Oe(e,t){try{e.ResourceProperties.Create=y(e.ResourceProperties.Create),e.ResourceProperties.Update=y(e.ResourceProperties.Update),e.ResourceProperties.Delete=y(e.ResourceProperties.Delete);let a={},r;switch(e.RequestType){case"Create":r=e.ResourceProperties.Create?.physicalResourceId?.id??e.ResourceProperties.Update?.physicalResourceId?.id??e.ResourceProperties.Delete?.physicalResourceId?.id??e.LogicalResourceId;break;case"Update":case"Delete":r=e.ResourceProperties[e.RequestType]?.physicalResourceId?.id??e.PhysicalResourceId;break}let i=e.ResourceProperties[e.RequestType];if(i){let o=i.service.startsWith("@aws-sdk/")?i.service:(0,C.getV3ClientPackageName)(i.service),n=o.split("/client-")[1],s=xe(o,e.ResourceProperties.InstallLatestAwsSdk);console.log(JSON.stringify({...e,ResponseURL:"..."}));let u;if(i.assumedRoleArn){let m=new Date().getTime(),g={RoleArn:i.assumedRoleArn,RoleSessionName:`${m}-${r}`.substring(0,64)},{fromTemporaryCredentials:le}=await import("@aws-sdk/credential-providers");u=le({params:g,clientConfig:i.region!==void 0?{region:i.region}:void 0})}s=await s;let p=(0,C.findV3ClientConstructor)(s),c=new p({apiVersion:i.apiVersion,credentials:u,region:i.region}),K=i.action.endsWith("Command")?i.action:`${i.action}Command`,se=K.replace(/Command$/,""),ce=Object.entries(s).find(([m])=>m.toLowerCase()===K.toLowerCase())?.[1],R={};try{let m=await c.send(new ce(i.parameters?(0,C.coerceApiParametersToUint8Array)(n,se,V(i.parameters,r)):{}));R={apiVersion:c.config.apiVersion,region:await c.config.region().catch(()=>{}),...B(m)};let g;i.outputPath?g=[i.outputPath]:i.outputPaths&&(g=i.outputPaths),g?a=I(R,E(g)):a=R}catch(m){let g=m.name??m.constructor.name;if(!i.ignoreErrorCodesMatching||!new RegExp(i.ignoreErrorCodesMatching).test(g))throw m}i.physicalResourceId?.responsePath&&(r=R[i.physicalResourceId.responsePath])}await b(e,"SUCCESS","OK",r,a)}catch(a){console.log(a),await b(e,"FAILED",a.message||"Internal Error",t.logStreamName,{})}}var ae,C,h,re=d(()=>{"use strict";ae=require("child_process"),C=M(te());D();h={}});var Ue={};S(Ue,{PHYSICAL_RESOURCE_ID_REFERENCE:()=>P,handler:()=>Fe,v2handler:()=>ne,v3handler:()=>oe});module.exports=f(Ue);D();function ne(e,t){return(N(),f(_)).handler(e,t)}function oe(e,t){return(re(),f(ie)).handler(e,t)}function Fe(e,t){let a=process.env.AWS_EXECUTION_ENV;return a&&a>="AWS_Lambda_nodejs18.x"?oe(e,t):ne(e,t)}0&&(module.exports={PHYSICAL_RESOURCE_ID_REFERENCE,handler,v2handler,v3handler}); diff --git a/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/cdk.out b/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/cdk.out new file mode 100644 index 0000000000000..2313ab5436501 --- /dev/null +++ b/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"34.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/integ.json b/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/integ.json new file mode 100644 index 0000000000000..be4e208f3cf6f --- /dev/null +++ b/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "34.0.0", + "testCases": { + "KafkaZookeeperIntegTest/DefaultTest": { + "stacks": [ + "KafkaZookeeperTestStack" + ], + "assertionStack": "KafkaZookeeperIntegTest/DefaultTest/DeployAssert", + "assertionStackName": "KafkaZookeeperIntegTestDefaultTestDeployAssert731E1402" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/manifest.json b/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/manifest.json new file mode 100644 index 0000000000000..b91d38ca08b9b --- /dev/null +++ b/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/manifest.json @@ -0,0 +1,315 @@ +{ + "version": "34.0.0", + "artifacts": { + "KafkaZookeeperTestStack.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "KafkaZookeeperTestStack.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "KafkaZookeeperTestStack": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "KafkaZookeeperTestStack.template.json", + "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}/fc4b1fb965e9b49fa2317ca42c59074b627947bfbfa39f5ba7e12985b59869a9.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "KafkaZookeeperTestStack.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": [ + "KafkaZookeeperTestStack.assets" + ], + "metadata": { + "/KafkaZookeeperTestStack/Vpc/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Vpc8378EB38" + } + ], + "/KafkaZookeeperTestStack/Vpc/PublicSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1Subnet5C2D37C4", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_REPLACE" + ] + } + ], + "/KafkaZookeeperTestStack/Vpc/PublicSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1RouteTable6C95E38E" + } + ], + "/KafkaZookeeperTestStack/Vpc/PublicSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1RouteTableAssociation97140677", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_REPLACE" + ] + } + ], + "/KafkaZookeeperTestStack/Vpc/PublicSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1DefaultRoute3DA9E72A" + } + ], + "/KafkaZookeeperTestStack/Vpc/PublicSubnet1/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1EIPD7E02669" + } + ], + "/KafkaZookeeperTestStack/Vpc/PublicSubnet1/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1NATGateway4D7517AA", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_REPLACE" + ] + } + ], + "/KafkaZookeeperTestStack/Vpc/PublicSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2Subnet691E08A3", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_REPLACE" + ] + } + ], + "/KafkaZookeeperTestStack/Vpc/PublicSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2RouteTable94F7E489" + } + ], + "/KafkaZookeeperTestStack/Vpc/PublicSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2RouteTableAssociationDD5762D8", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_REPLACE" + ] + } + ], + "/KafkaZookeeperTestStack/Vpc/PublicSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2DefaultRoute97F91067" + } + ], + "/KafkaZookeeperTestStack/Vpc/PublicSubnet2/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2EIP3C605A87" + } + ], + "/KafkaZookeeperTestStack/Vpc/PublicSubnet2/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2NATGateway9182C01D", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_REPLACE" + ] + } + ], + "/KafkaZookeeperTestStack/Vpc/PrivateSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1Subnet536B997A", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_REPLACE" + ] + } + ], + "/KafkaZookeeperTestStack/Vpc/PrivateSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1RouteTableB2C5B500" + } + ], + "/KafkaZookeeperTestStack/Vpc/PrivateSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1RouteTableAssociation70C59FA6", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_REPLACE" + ] + } + ], + "/KafkaZookeeperTestStack/Vpc/PrivateSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1DefaultRouteBE02A9ED" + } + ], + "/KafkaZookeeperTestStack/Vpc/PrivateSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2Subnet3788AAA1", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_REPLACE" + ] + } + ], + "/KafkaZookeeperTestStack/Vpc/PrivateSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2RouteTableA678073B" + } + ], + "/KafkaZookeeperTestStack/Vpc/PrivateSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2RouteTableAssociationA89CAD56", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_REPLACE" + ] + } + ], + "/KafkaZookeeperTestStack/Vpc/PrivateSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2DefaultRoute060D2087" + } + ], + "/KafkaZookeeperTestStack/Vpc/IGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcIGWD7BA715C" + } + ], + "/KafkaZookeeperTestStack/Vpc/VPCGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcVPCGWBF912B6E" + } + ], + "/KafkaZookeeperTestStack/ClusterZookeeper/SecurityGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterZookeeperSecurityGroupD3CFED03" + } + ], + "/KafkaZookeeperTestStack/ClusterZookeeper/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterZookeeper29ECF2D7" + } + ], + "/KafkaZookeeperTestStack/ClusterZookeeper/ZookeeperConnect/Resource/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterZookeeperZookeeperConnectDBC3303D" + } + ], + "/KafkaZookeeperTestStack/ClusterZookeeper/ZookeeperConnect/CustomResourcePolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterZookeeperZookeeperConnectCustomResourcePolicy762D4B4E" + } + ], + "/KafkaZookeeperTestStack/AWS679f53fac002430cb0da5b7982bd2287/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" + } + ], + "/KafkaZookeeperTestStack/AWS679f53fac002430cb0da5b7982bd2287/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "AWS679f53fac002430cb0da5b7982bd22872D164C4C" + } + ], + "/KafkaZookeeperTestStack/Zookeeper": [ + { + "type": "aws:cdk:logicalId", + "data": "Zookeeper" + } + ], + "/KafkaZookeeperTestStack/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/KafkaZookeeperTestStack/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "KafkaZookeeperTestStack" + }, + "KafkaZookeeperIntegTestDefaultTestDeployAssert731E1402.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "KafkaZookeeperIntegTestDefaultTestDeployAssert731E1402.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "KafkaZookeeperIntegTestDefaultTestDeployAssert731E1402": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "KafkaZookeeperIntegTestDefaultTestDeployAssert731E1402.template.json", + "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": [ + "KafkaZookeeperIntegTestDefaultTestDeployAssert731E1402.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": [ + "KafkaZookeeperIntegTestDefaultTestDeployAssert731E1402.assets" + ], + "metadata": { + "/KafkaZookeeperIntegTest/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/KafkaZookeeperIntegTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "KafkaZookeeperIntegTest/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/tree.json b/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/tree.json new file mode 100644 index 0000000000000..f048d23733d42 --- /dev/null +++ b/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.js.snapshot/tree.json @@ -0,0 +1,1053 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "KafkaZookeeperTestStack": { + "id": "KafkaZookeeperTestStack", + "path": "KafkaZookeeperTestStack", + "children": { + "Vpc": { + "id": "Vpc", + "path": "KafkaZookeeperTestStack/Vpc", + "children": { + "Resource": { + "id": "Resource", + "path": "KafkaZookeeperTestStack/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": "KafkaZookeeperTestStack/Vpc" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" + } + }, + "PublicSubnet1": { + "id": "PublicSubnet1", + "path": "KafkaZookeeperTestStack/Vpc/PublicSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "KafkaZookeeperTestStack/Vpc/PublicSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.0.0/18", + "mapPublicIpOnLaunch": true, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Public" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Public" + }, + { + "key": "Name", + "value": "KafkaZookeeperTestStack/Vpc/PublicSubnet1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "KafkaZookeeperTestStack/Vpc/PublicSubnet1/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "KafkaZookeeperTestStack/Vpc/PublicSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "KafkaZookeeperTestStack/Vpc/PublicSubnet1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "KafkaZookeeperTestStack/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": "KafkaZookeeperTestStack/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": "KafkaZookeeperTestStack/Vpc/PublicSubnet1/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "KafkaZookeeperTestStack/Vpc/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "KafkaZookeeperTestStack/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": "KafkaZookeeperTestStack/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": "KafkaZookeeperTestStack/Vpc/PublicSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "KafkaZookeeperTestStack/Vpc/PublicSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.64.0/18", + "mapPublicIpOnLaunch": true, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Public" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Public" + }, + { + "key": "Name", + "value": "KafkaZookeeperTestStack/Vpc/PublicSubnet2" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "KafkaZookeeperTestStack/Vpc/PublicSubnet2/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "KafkaZookeeperTestStack/Vpc/PublicSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "KafkaZookeeperTestStack/Vpc/PublicSubnet2" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "KafkaZookeeperTestStack/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": "KafkaZookeeperTestStack/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": "KafkaZookeeperTestStack/Vpc/PublicSubnet2/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "KafkaZookeeperTestStack/Vpc/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "KafkaZookeeperTestStack/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": "KafkaZookeeperTestStack/Vpc/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" + } + }, + "PrivateSubnet1": { + "id": "PrivateSubnet1", + "path": "KafkaZookeeperTestStack/Vpc/PrivateSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "KafkaZookeeperTestStack/Vpc/PrivateSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.128.0/18", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Private" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Private" + }, + { + "key": "Name", + "value": "KafkaZookeeperTestStack/Vpc/PrivateSubnet1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "KafkaZookeeperTestStack/Vpc/PrivateSubnet1/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "KafkaZookeeperTestStack/Vpc/PrivateSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "KafkaZookeeperTestStack/Vpc/PrivateSubnet1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "KafkaZookeeperTestStack/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": "KafkaZookeeperTestStack/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": "KafkaZookeeperTestStack/Vpc/PrivateSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "KafkaZookeeperTestStack/Vpc/PrivateSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.192.0/18", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Private" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Private" + }, + { + "key": "Name", + "value": "KafkaZookeeperTestStack/Vpc/PrivateSubnet2" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "KafkaZookeeperTestStack/Vpc/PrivateSubnet2/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "KafkaZookeeperTestStack/Vpc/PrivateSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "KafkaZookeeperTestStack/Vpc/PrivateSubnet2" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "KafkaZookeeperTestStack/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": "KafkaZookeeperTestStack/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" + } + }, + "IGW": { + "id": "IGW", + "path": "KafkaZookeeperTestStack/Vpc/IGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::InternetGateway", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "KafkaZookeeperTestStack/Vpc" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" + } + }, + "VPCGW": { + "id": "VPCGW", + "path": "KafkaZookeeperTestStack/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" + } + }, + "ClusterZookeeper": { + "id": "ClusterZookeeper", + "path": "KafkaZookeeperTestStack/ClusterZookeeper", + "children": { + "SecurityGroup": { + "id": "SecurityGroup", + "path": "KafkaZookeeperTestStack/ClusterZookeeper/SecurityGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "KafkaZookeeperTestStack/ClusterZookeeper/SecurityGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", + "aws:cdk:cloudformation:props": { + "groupDescription": "MSK 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" + } + }, + "Resource": { + "id": "Resource", + "path": "KafkaZookeeperTestStack/ClusterZookeeper/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::MSK::Cluster", + "aws:cdk:cloudformation:props": { + "brokerNodeGroupInfo": { + "instanceType": "kafka.m5.large", + "clientSubnets": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + ], + "securityGroups": [ + { + "Fn::GetAtt": [ + "ClusterZookeeperSecurityGroupD3CFED03", + "GroupId" + ] + } + ], + "storageInfo": { + "ebsStorageInfo": { + "volumeSize": 1000 + } + } + }, + "clusterName": "cluster-zookeeper", + "encryptionInfo": { + "encryptionInTransit": { + "clientBroker": "TLS", + "inCluster": true + } + }, + "kafkaVersion": "3.4.0", + "loggingInfo": { + "brokerLogs": { + "cloudWatchLogs": { + "enabled": false + }, + "firehose": { + "enabled": false + }, + "s3": { + "enabled": false + } + } + }, + "numberOfBrokerNodes": 2 + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_msk.CfnCluster", + "version": "0.0.0" + } + }, + "ZookeeperConnect": { + "id": "ZookeeperConnect", + "path": "KafkaZookeeperTestStack/ClusterZookeeper/ZookeeperConnect", + "children": { + "Provider": { + "id": "Provider", + "path": "KafkaZookeeperTestStack/ClusterZookeeper/ZookeeperConnect/Provider", + "constructInfo": { + "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "KafkaZookeeperTestStack/ClusterZookeeper/ZookeeperConnect/Resource", + "children": { + "Default": { + "id": "Default", + "path": "KafkaZookeeperTestStack/ClusterZookeeper/ZookeeperConnect/Resource/Default", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.CustomResource", + "version": "0.0.0" + } + }, + "CustomResourcePolicy": { + "id": "CustomResourcePolicy", + "path": "KafkaZookeeperTestStack/ClusterZookeeper/ZookeeperConnect/CustomResourcePolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "KafkaZookeeperTestStack/ClusterZookeeper/ZookeeperConnect/CustomResourcePolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "kafka:DescribeCluster", + "Effect": "Allow", + "Resource": { + "Ref": "ClusterZookeeper29ECF2D7" + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterZookeeperZookeeperConnectCustomResourcePolicy762D4B4E", + "roles": [ + { + "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.custom_resources.AwsCustomResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-msk-alpha.Cluster", + "version": "0.0.0" + } + }, + "AWS679f53fac002430cb0da5b7982bd2287": { + "id": "AWS679f53fac002430cb0da5b7982bd2287", + "path": "KafkaZookeeperTestStack/AWS679f53fac002430cb0da5b7982bd2287", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "KafkaZookeeperTestStack/AWS679f53fac002430cb0da5b7982bd2287/ServiceRole", + "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "KafkaZookeeperTestStack/AWS679f53fac002430cb0da5b7982bd2287/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "KafkaZookeeperTestStack/AWS679f53fac002430cb0da5b7982bd2287/ServiceRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "managedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "Code": { + "id": "Code", + "path": "KafkaZookeeperTestStack/AWS679f53fac002430cb0da5b7982bd2287/Code", + "children": { + "Stage": { + "id": "Stage", + "path": "KafkaZookeeperTestStack/AWS679f53fac002430cb0da5b7982bd2287/Code/Stage", + "constructInfo": { + "fqn": "aws-cdk-lib.AssetStaging", + "version": "0.0.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "KafkaZookeeperTestStack/AWS679f53fac002430cb0da5b7982bd2287/Code/AssetBucket", + "constructInfo": { + "fqn": "aws-cdk-lib.aws_s3.BucketBase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_s3_assets.Asset", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "KafkaZookeeperTestStack/AWS679f53fac002430cb0da5b7982bd2287/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Lambda::Function", + "aws:cdk:cloudformation:props": { + "code": { + "s3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "s3Key": "03adb2514e02907e0458bec59283658ec529425bd5df38e1194455c65dedf6ff.zip" + }, + "handler": "index.handler", + "role": { + "Fn::GetAtt": [ + "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2", + "Arn" + ] + }, + "runtime": "nodejs18.x", + "timeout": 120 + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_lambda.Function", + "version": "0.0.0" + } + }, + "Zookeeper": { + "id": "Zookeeper", + "path": "KafkaZookeeperTestStack/Zookeeper", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "KafkaZookeeperTestStack/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "KafkaZookeeperTestStack/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "KafkaZookeeperIntegTest": { + "id": "KafkaZookeeperIntegTest", + "path": "KafkaZookeeperIntegTest", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "KafkaZookeeperIntegTest/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "KafkaZookeeperIntegTest/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.70" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "KafkaZookeeperIntegTest/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "KafkaZookeeperIntegTest/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "KafkaZookeeperIntegTest/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.2.70" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.ts b/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.ts new file mode 100644 index 0000000000000..9695725f7089d --- /dev/null +++ b/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster-zookeeper.ts @@ -0,0 +1,41 @@ +import { App, RemovalPolicy, Stack, CfnOutput } from 'aws-cdk-lib'; +import * as msk from '../lib/index'; +import { Construct } from 'constructs'; +import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import { Vpc } from 'aws-cdk-lib/aws-ec2'; + +/* + * Stack verification steps: + * + * -- the zookeeper string is returned as a cfnoutput to the console + */ + +class KafkaZookeeperTest extends Stack { + public readonly zookeeperConnection: string; + + constructor(scope: Construct, id: string) { + super(scope, id); + const vpc = new Vpc(this, 'Vpc', { maxAzs: 2, restrictDefaultSecurityGroup: false }); + + const cluster = new msk.Cluster(this, 'ClusterZookeeper', { + clusterName: 'cluster-zookeeper', + kafkaVersion: msk.KafkaVersion.V3_4_0, + vpc, + removalPolicy: RemovalPolicy.DESTROY, + }); + + this.zookeeperConnection = cluster.zookeeperConnectionString; + + new CfnOutput(this, 'Zookeeper', { + value: this.zookeeperConnection, + }); + } +} + +const app = new App(); +const testCase = new KafkaZookeeperTest(app, 'KafkaZookeeperTestStack'); +new IntegTest(app, 'KafkaZookeeperIntegTest', { + testCases: [testCase], +}); + +app.synth();