// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`default validation 1`] = ` { "Outputs": { "DemoServiceApiEndpoint155DBA67": { "Value": { "Fn::GetAtt": [ "DemoServiceHttpApi6F105817", "ApiEndpoint", ], }, }, }, "Parameters": { "BootstrapVersion": { "Default": "/cdk-bootstrap/hnb659fds/version", "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]", "Type": "AWS::SSM::Parameter::Value", }, }, "Resources": { "Cluster3DA9CCBA": { "Properties": { "CapacityProviders": [ "FARGATE", "FARGATE_SPOT", ], "Cluster": { "Ref": "ClusterEB0386A7", }, "DefaultCapacityProviderStrategy": [ { "Base": 2, "CapacityProvider": "FARGATE_SPOT", "Weight": 50, }, { "CapacityProvider": "FARGATE", "Weight": 50, }, ], }, "Type": "AWS::ECS::ClusterCapacityProviderAssociations", }, "ClusterEB0386A7": { "Type": "AWS::ECS::Cluster", }, "DemoServiceFargateService96BA427F": { "Properties": { "CapacityProviderStrategy": [ { "Base": 2, "CapacityProvider": "FARGATE_SPOT", "Weight": 50, }, { "CapacityProvider": "FARGATE", "Weight": 50, }, ], "Cluster": { "Ref": "ClusterEB0386A7", }, "DeploymentConfiguration": { "MaximumPercent": 200, "MinimumHealthyPercent": 50, }, "DesiredCount": 2, "EnableECSManagedTags": false, "NetworkConfiguration": { "AwsvpcConfiguration": { "AssignPublicIp": "DISABLED", "SecurityGroups": [ { "Fn::GetAtt": [ "DemoServiceFargateServiceSecurityGroupB86B635C", "GroupId", ], }, ], "Subnets": [ { "Ref": "VpcPrivateSubnet1Subnet536B997A", }, { "Ref": "VpcPrivateSubnet2Subnet3788AAA1", }, ], }, }, "ServiceConnectConfiguration": { "Enabled": true, "Namespace": { "Fn::GetAtt": [ "DemoServicehttpNameSpaceDemoServiceCA3F3EC2", "Arn", ], }, "Services": [ { "ClientAliases": [ { "Port": 80, }, ], "PortName": "default", }, ], }, "TaskDefinition": { "Ref": "Task79114B6B", }, }, "Type": "AWS::ECS::Service", }, "DemoServiceFargateServiceSecurityGroupB86B635C": { "Properties": { "GroupDescription": "integ-testing/DemoService/FargateService/SecurityGroup", "SecurityGroupEgress": [ { "CidrIp": "0.0.0.0/0", "Description": "Allow all outbound traffic by default", "IpProtocol": "-1", }, ], "SecurityGroupIngress": [ { "CidrIp": { "Fn::GetAtt": [ "Vpc8378EB38", "CidrBlock", ], }, "Description": { "Fn::Join": [ "", [ "from ", { "Fn::GetAtt": [ "Vpc8378EB38", "CidrBlock", ], }, ":80", ], ], }, "FromPort": 80, "IpProtocol": "tcp", "ToPort": 80, }, ], "VpcId": { "Ref": "Vpc8378EB38", }, }, "Type": "AWS::EC2::SecurityGroup", }, "DemoServiceHttpApi6F105817": { "Properties": { "Name": "HttpApi", "ProtocolType": "HTTP", }, "Type": "AWS::ApiGatewayV2::Api", }, "DemoServiceHttpApiDefaultRoute9EF06928": { "Properties": { "ApiId": { "Ref": "DemoServiceHttpApi6F105817", }, "AuthorizationType": "NONE", "RouteKey": "$default", "Target": { "Fn::Join": [ "", [ "integrations/", { "Ref": "DemoServiceHttpApiDefaultRouteCloudMapIntegration4DDAA4A9", }, ], ], }, }, "Type": "AWS::ApiGatewayV2::Route", }, "DemoServiceHttpApiDefaultRouteCloudMapIntegration4DDAA4A9": { "Properties": { "ApiId": { "Ref": "DemoServiceHttpApi6F105817", }, "ConnectionId": { "Ref": "DemoServiceVpcLink41AD9E6F", }, "ConnectionType": "VPC_LINK", "IntegrationMethod": "ANY", "IntegrationType": "HTTP_PROXY", "IntegrationUri": { "Fn::GetAtt": [ "DemoServiceserviceconnecthandlerA10F2E46", "serviceArn", ], }, "PayloadFormatVersion": "1.0", }, "Type": "AWS::ApiGatewayV2::Integration", }, "DemoServiceHttpApiDefaultStage1EB1F7EA": { "Properties": { "ApiId": { "Ref": "DemoServiceHttpApi6F105817", }, "AutoDeploy": true, "StageName": "$default", }, "Type": "AWS::ApiGatewayV2::Stage", }, "DemoServiceOnEventHandler923A8391": { "DependsOn": [ "DemoServiceOnEventHandlerServiceRoleDefaultPolicy278FC375", "DemoServiceOnEventHandlerServiceRoleF0C309D7", ], "Properties": { "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", }, "S3Key": "ed78ef9975df0fa5d4be9c1ae824c5885d1a677d68c910ca454b38ed825a34e1.zip", }, "Handler": "index.on_event", "Role": { "Fn::GetAtt": [ "DemoServiceOnEventHandlerServiceRoleF0C309D7", "Arn", ], }, "Runtime": "python3.9", }, "Type": "AWS::Lambda::Function", }, "DemoServiceOnEventHandlerServiceRoleDefaultPolicy278FC375": { "Properties": { "PolicyDocument": { "Statement": [ { "Action": "ecs:DescribeServices", "Effect": "Allow", "Resource": { "Ref": "DemoServiceFargateService96BA427F", }, }, ], "Version": "2012-10-17", }, "PolicyName": "DemoServiceOnEventHandlerServiceRoleDefaultPolicy278FC375", "Roles": [ { "Ref": "DemoServiceOnEventHandlerServiceRoleF0C309D7", }, ], }, "Type": "AWS::IAM::Policy", }, "DemoServiceOnEventHandlerServiceRoleF0C309D7": { "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", ], ], }, ], }, "Type": "AWS::IAM::Role", }, "DemoServiceVpcLink41AD9E6F": { "Properties": { "Name": "integtestingDemoServiceVpcLink4EE5D68B", "SecurityGroupIds": [], "SubnetIds": [ { "Ref": "VpcPrivateSubnet1Subnet536B997A", }, { "Ref": "VpcPrivateSubnet2Subnet3788AAA1", }, ], }, "Type": "AWS::ApiGatewayV2::VpcLink", }, "DemoServicehttpNameSpaceDemoServiceCA3F3EC2": { "Properties": { "Name": "httpNameSpaceDemoService", }, "Type": "AWS::ServiceDiscovery::HttpNamespace", }, "DemoServiceserviceConnectHandlerframeworkonEventB719ED70": { "DependsOn": [ "DemoServiceserviceConnectHandlerframeworkonEventServiceRoleDefaultPolicy460E7208", "DemoServiceserviceConnectHandlerframeworkonEventServiceRole884E0612", ], "Properties": { "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", }, "S3Key": "8e3d635893ea17fa3158623489cd42c680fad925b38de1ef51cb10d84f6e245e.zip", }, "Description": "AWS CDK resource provider framework - onEvent (integ-testing/DemoService/serviceConnectHandler)", "Environment": { "Variables": { "USER_ON_EVENT_FUNCTION_ARN": { "Fn::GetAtt": [ "DemoServiceOnEventHandler923A8391", "Arn", ], }, }, }, "Handler": "framework.onEvent", "Role": { "Fn::GetAtt": [ "DemoServiceserviceConnectHandlerframeworkonEventServiceRole884E0612", "Arn", ], }, "Runtime": "nodejs14.x", "Timeout": 900, }, "Type": "AWS::Lambda::Function", }, "DemoServiceserviceConnectHandlerframeworkonEventServiceRole884E0612": { "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", ], ], }, ], }, "Type": "AWS::IAM::Role", }, "DemoServiceserviceConnectHandlerframeworkonEventServiceRoleDefaultPolicy460E7208": { "Properties": { "PolicyDocument": { "Statement": [ { "Action": "lambda:InvokeFunction", "Effect": "Allow", "Resource": [ { "Fn::GetAtt": [ "DemoServiceOnEventHandler923A8391", "Arn", ], }, { "Fn::Join": [ "", [ { "Fn::GetAtt": [ "DemoServiceOnEventHandler923A8391", "Arn", ], }, ":*", ], ], }, ], }, ], "Version": "2012-10-17", }, "PolicyName": "DemoServiceserviceConnectHandlerframeworkonEventServiceRoleDefaultPolicy460E7208", "Roles": [ { "Ref": "DemoServiceserviceConnectHandlerframeworkonEventServiceRole884E0612", }, ], }, "Type": "AWS::IAM::Policy", }, "DemoServiceserviceconnecthandlerA10F2E46": { "DeletionPolicy": "Delete", "Properties": { "ServiceToken": { "Fn::GetAtt": [ "DemoServiceserviceConnectHandlerframeworkonEventB719ED70", "Arn", ], }, "clusterName": { "Ref": "ClusterEB0386A7", }, "discoveryName": "default", "serviceName": { "Fn::GetAtt": [ "DemoServiceFargateService96BA427F", "Name", ], }, }, "Type": "Custom::ServiceConnectHandler", "UpdateReplacePolicy": "Delete", }, "Task79114B6B": { "Properties": { "ContainerDefinitions": [ { "Essential": true, "HealthCheck": { "Command": [ "CMD-SHELL", "curl -f http://localhost/ || exit 1", ], "Interval": 30, "Retries": 3, "Timeout": 5, }, "Image": "public.ecr.aws/pahudnet/nyancat-docker-image:latest", "Name": "nyancat", "PortMappings": [ { "ContainerPort": 80, "Name": "default", "Protocol": "tcp", }, ], }, ], "Cpu": "256", "Family": "integtestingTask9A4D11DB", "Memory": "512", "NetworkMode": "awsvpc", "RequiresCompatibilities": [ "FARGATE", ], "TaskRoleArn": { "Fn::GetAtt": [ "TaskTaskRoleE98524A1", "Arn", ], }, }, "Type": "AWS::ECS::TaskDefinition", }, "TaskTaskRoleE98524A1": { "Properties": { "AssumeRolePolicyDocument": { "Statement": [ { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": { "Service": "ecs-tasks.amazonaws.com", }, }, ], "Version": "2012-10-17", }, }, "Type": "AWS::IAM::Role", }, "Vpc8378EB38": { "Properties": { "CidrBlock": "10.0.0.0/16", "EnableDnsHostnames": true, "EnableDnsSupport": true, "InstanceTenancy": "default", "Tags": [ { "Key": "Name", "Value": "integ-testing/Vpc", }, ], }, "Type": "AWS::EC2::VPC", }, "VpcIGWD7BA715C": { "Properties": { "Tags": [ { "Key": "Name", "Value": "integ-testing/Vpc", }, ], }, "Type": "AWS::EC2::InternetGateway", }, "VpcPrivateSubnet1DefaultRouteBE02A9ED": { "Properties": { "DestinationCidrBlock": "0.0.0.0/0", "NatGatewayId": { "Ref": "VpcPublicSubnet1NATGateway4D7517AA", }, "RouteTableId": { "Ref": "VpcPrivateSubnet1RouteTableB2C5B500", }, }, "Type": "AWS::EC2::Route", }, "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { "Properties": { "RouteTableId": { "Ref": "VpcPrivateSubnet1RouteTableB2C5B500", }, "SubnetId": { "Ref": "VpcPrivateSubnet1Subnet536B997A", }, }, "Type": "AWS::EC2::SubnetRouteTableAssociation", }, "VpcPrivateSubnet1RouteTableB2C5B500": { "Properties": { "Tags": [ { "Key": "Name", "Value": "integ-testing/Vpc/PrivateSubnet1", }, ], "VpcId": { "Ref": "Vpc8378EB38", }, }, "Type": "AWS::EC2::RouteTable", }, "VpcPrivateSubnet1Subnet536B997A": { "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": "integ-testing/Vpc/PrivateSubnet1", }, ], "VpcId": { "Ref": "Vpc8378EB38", }, }, "Type": "AWS::EC2::Subnet", }, "VpcPrivateSubnet2DefaultRoute060D2087": { "Properties": { "DestinationCidrBlock": "0.0.0.0/0", "NatGatewayId": { "Ref": "VpcPublicSubnet1NATGateway4D7517AA", }, "RouteTableId": { "Ref": "VpcPrivateSubnet2RouteTableA678073B", }, }, "Type": "AWS::EC2::Route", }, "VpcPrivateSubnet2RouteTableA678073B": { "Properties": { "Tags": [ { "Key": "Name", "Value": "integ-testing/Vpc/PrivateSubnet2", }, ], "VpcId": { "Ref": "Vpc8378EB38", }, }, "Type": "AWS::EC2::RouteTable", }, "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { "Properties": { "RouteTableId": { "Ref": "VpcPrivateSubnet2RouteTableA678073B", }, "SubnetId": { "Ref": "VpcPrivateSubnet2Subnet3788AAA1", }, }, "Type": "AWS::EC2::SubnetRouteTableAssociation", }, "VpcPrivateSubnet2Subnet3788AAA1": { "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": "integ-testing/Vpc/PrivateSubnet2", }, ], "VpcId": { "Ref": "Vpc8378EB38", }, }, "Type": "AWS::EC2::Subnet", }, "VpcPublicSubnet1DefaultRoute3DA9E72A": { "DependsOn": [ "VpcVPCGWBF912B6E", ], "Properties": { "DestinationCidrBlock": "0.0.0.0/0", "GatewayId": { "Ref": "VpcIGWD7BA715C", }, "RouteTableId": { "Ref": "VpcPublicSubnet1RouteTable6C95E38E", }, }, "Type": "AWS::EC2::Route", }, "VpcPublicSubnet1EIPD7E02669": { "Properties": { "Domain": "vpc", "Tags": [ { "Key": "Name", "Value": "integ-testing/Vpc/PublicSubnet1", }, ], }, "Type": "AWS::EC2::EIP", }, "VpcPublicSubnet1NATGateway4D7517AA": { "DependsOn": [ "VpcPublicSubnet1DefaultRoute3DA9E72A", "VpcPublicSubnet1RouteTableAssociation97140677", ], "Properties": { "AllocationId": { "Fn::GetAtt": [ "VpcPublicSubnet1EIPD7E02669", "AllocationId", ], }, "SubnetId": { "Ref": "VpcPublicSubnet1Subnet5C2D37C4", }, "Tags": [ { "Key": "Name", "Value": "integ-testing/Vpc/PublicSubnet1", }, ], }, "Type": "AWS::EC2::NatGateway", }, "VpcPublicSubnet1RouteTable6C95E38E": { "Properties": { "Tags": [ { "Key": "Name", "Value": "integ-testing/Vpc/PublicSubnet1", }, ], "VpcId": { "Ref": "Vpc8378EB38", }, }, "Type": "AWS::EC2::RouteTable", }, "VpcPublicSubnet1RouteTableAssociation97140677": { "Properties": { "RouteTableId": { "Ref": "VpcPublicSubnet1RouteTable6C95E38E", }, "SubnetId": { "Ref": "VpcPublicSubnet1Subnet5C2D37C4", }, }, "Type": "AWS::EC2::SubnetRouteTableAssociation", }, "VpcPublicSubnet1Subnet5C2D37C4": { "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": "integ-testing/Vpc/PublicSubnet1", }, ], "VpcId": { "Ref": "Vpc8378EB38", }, }, "Type": "AWS::EC2::Subnet", }, "VpcPublicSubnet2DefaultRoute97F91067": { "DependsOn": [ "VpcVPCGWBF912B6E", ], "Properties": { "DestinationCidrBlock": "0.0.0.0/0", "GatewayId": { "Ref": "VpcIGWD7BA715C", }, "RouteTableId": { "Ref": "VpcPublicSubnet2RouteTable94F7E489", }, }, "Type": "AWS::EC2::Route", }, "VpcPublicSubnet2RouteTable94F7E489": { "Properties": { "Tags": [ { "Key": "Name", "Value": "integ-testing/Vpc/PublicSubnet2", }, ], "VpcId": { "Ref": "Vpc8378EB38", }, }, "Type": "AWS::EC2::RouteTable", }, "VpcPublicSubnet2RouteTableAssociationDD5762D8": { "Properties": { "RouteTableId": { "Ref": "VpcPublicSubnet2RouteTable94F7E489", }, "SubnetId": { "Ref": "VpcPublicSubnet2Subnet691E08A3", }, }, "Type": "AWS::EC2::SubnetRouteTableAssociation", }, "VpcPublicSubnet2Subnet691E08A3": { "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": "integ-testing/Vpc/PublicSubnet2", }, ], "VpcId": { "Ref": "Vpc8378EB38", }, }, "Type": "AWS::EC2::Subnet", }, "VpcVPCGWBF912B6E": { "Properties": { "InternetGatewayId": { "Ref": "VpcIGWD7BA715C", }, "VpcId": { "Ref": "Vpc8378EB38", }, }, "Type": "AWS::EC2::VPCGatewayAttachment", }, }, "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.", }, ], }, }, } `;