diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.js.snapshot/EcsDeploymentGroupTestDefaultTestDeployAssert60AABFA0.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.js.snapshot/EcsDeploymentGroupTestDefaultTestDeployAssert60AABFA0.assets.json index 450725bf2e337..a12cfbdbba5ba 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.js.snapshot/EcsDeploymentGroupTestDefaultTestDeployAssert60AABFA0.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.js.snapshot/EcsDeploymentGroupTestDefaultTestDeployAssert60AABFA0.assets.json @@ -1,5 +1,5 @@ { - "version": "32.0.0", + "version": "34.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.js.snapshot/aws-cdk-codedeploy-ecs-dg.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.js.snapshot/aws-cdk-codedeploy-ecs-dg.assets.json index a0b1b02ba7950..3cf5ed0926e98 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.js.snapshot/aws-cdk-codedeploy-ecs-dg.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.js.snapshot/aws-cdk-codedeploy-ecs-dg.assets.json @@ -1,7 +1,7 @@ { - "version": "32.0.0", + "version": "34.0.0", "files": { - "54ea34edd18b9383781f88fd1ab5487b7d2a4ca076f0a365fa77e3b3a4b109d9": { + "710f6bc445077db08ceffaf64861f978b37344d19f910739818890c51a58f0d9": { "source": { "path": "aws-cdk-codedeploy-ecs-dg.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "54ea34edd18b9383781f88fd1ab5487b7d2a4ca076f0a365fa77e3b3a4b109d9.json", + "objectKey": "710f6bc445077db08ceffaf64861f978b37344d19f910739818890c51a58f0d9.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.js.snapshot/aws-cdk-codedeploy-ecs-dg.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.js.snapshot/aws-cdk-codedeploy-ecs-dg.template.json index 64f48e53ec831..59fc30d6fffd1 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.js.snapshot/aws-cdk-codedeploy-ecs-dg.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.js.snapshot/aws-cdk-codedeploy-ecs-dg.template.json @@ -18,9 +18,6 @@ "VPCPublicSubnet1SubnetB4246D30": { "Type": "AWS::EC2::Subnet", "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, "AvailabilityZone": { "Fn::Select": [ 0, @@ -44,21 +41,24 @@ "Key": "Name", "Value": "aws-cdk-codedeploy-ecs-dg/VPC/PublicSubnet1" } - ] + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } } }, "VPCPublicSubnet1RouteTableFEE4B781": { "Type": "AWS::EC2::RouteTable", "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, "Tags": [ { "Key": "Name", "Value": "aws-cdk-codedeploy-ecs-dg/VPC/PublicSubnet1" } - ] + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } } }, "VPCPublicSubnet1RouteTableAssociation0B0896DC": { @@ -75,12 +75,12 @@ "VPCPublicSubnet1DefaultRoute91CEF279": { "Type": "AWS::EC2::Route", "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, "DestinationCidrBlock": "0.0.0.0/0", "GatewayId": { "Ref": "VPCIGWB7E252D3" + }, + "RouteTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" } }, "DependsOn": [ @@ -102,15 +102,15 @@ "VPCPublicSubnet1NATGatewayE0556630": { "Type": "AWS::EC2::NatGateway", "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, "AllocationId": { "Fn::GetAtt": [ "VPCPublicSubnet1EIP6AD938E8", "AllocationId" ] }, + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, "Tags": [ { "Key": "Name", @@ -126,9 +126,6 @@ "VPCPublicSubnet2Subnet74179F39": { "Type": "AWS::EC2::Subnet", "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, "AvailabilityZone": { "Fn::Select": [ 1, @@ -152,21 +149,24 @@ "Key": "Name", "Value": "aws-cdk-codedeploy-ecs-dg/VPC/PublicSubnet2" } - ] + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } } }, "VPCPublicSubnet2RouteTable6F1A15F1": { "Type": "AWS::EC2::RouteTable", "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, "Tags": [ { "Key": "Name", "Value": "aws-cdk-codedeploy-ecs-dg/VPC/PublicSubnet2" } - ] + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } } }, "VPCPublicSubnet2RouteTableAssociation5A808732": { @@ -183,12 +183,12 @@ "VPCPublicSubnet2DefaultRouteB7481BBA": { "Type": "AWS::EC2::Route", "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, "DestinationCidrBlock": "0.0.0.0/0", "GatewayId": { "Ref": "VPCIGWB7E252D3" + }, + "RouteTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" } }, "DependsOn": [ @@ -210,15 +210,15 @@ "VPCPublicSubnet2NATGateway3C070193": { "Type": "AWS::EC2::NatGateway", "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, "AllocationId": { "Fn::GetAtt": [ "VPCPublicSubnet2EIP4947BC00", "AllocationId" ] }, + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + }, "Tags": [ { "Key": "Name", @@ -234,9 +234,6 @@ "VPCPrivateSubnet1Subnet8BCA10E0": { "Type": "AWS::EC2::Subnet", "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, "AvailabilityZone": { "Fn::Select": [ 0, @@ -260,21 +257,24 @@ "Key": "Name", "Value": "aws-cdk-codedeploy-ecs-dg/VPC/PrivateSubnet1" } - ] + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } } }, "VPCPrivateSubnet1RouteTableBE8A6027": { "Type": "AWS::EC2::RouteTable", "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, "Tags": [ { "Key": "Name", "Value": "aws-cdk-codedeploy-ecs-dg/VPC/PrivateSubnet1" } - ] + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } } }, "VPCPrivateSubnet1RouteTableAssociation347902D1": { @@ -291,21 +291,18 @@ "VPCPrivateSubnet1DefaultRouteAE1D6490": { "Type": "AWS::EC2::Route", "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, "DestinationCidrBlock": "0.0.0.0/0", "NatGatewayId": { "Ref": "VPCPublicSubnet1NATGatewayE0556630" + }, + "RouteTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" } } }, "VPCPrivateSubnet2SubnetCFCDAA7A": { "Type": "AWS::EC2::Subnet", "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, "AvailabilityZone": { "Fn::Select": [ 1, @@ -329,21 +326,24 @@ "Key": "Name", "Value": "aws-cdk-codedeploy-ecs-dg/VPC/PrivateSubnet2" } - ] + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } } }, "VPCPrivateSubnet2RouteTable0A19E10E": { "Type": "AWS::EC2::RouteTable", "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, "Tags": [ { "Key": "Name", "Value": "aws-cdk-codedeploy-ecs-dg/VPC/PrivateSubnet2" } - ] + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } } }, "VPCPrivateSubnet2RouteTableAssociation0C73D413": { @@ -360,12 +360,12 @@ "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { "Type": "AWS::EC2::Route", "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, "DestinationCidrBlock": "0.0.0.0/0", "NatGatewayId": { "Ref": "VPCPublicSubnet2NATGateway3C070193" + }, + "RouteTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" } } }, @@ -383,11 +383,11 @@ "VPCVPCGW99B986DC": { "Type": "AWS::EC2::VPCGatewayAttachment", "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, "InternetGatewayId": { "Ref": "VPCIGWB7E252D3" + }, + "VpcId": { + "Ref": "VPCB9E5F0B4" } } }, @@ -528,7 +528,6 @@ "FargateServiceSecurityGroupfromawscdkcodedeployecsdgServiceLBSecurityGroupEC967688803C3B1119": { "Type": "AWS::EC2::SecurityGroupIngress", "Properties": { - "IpProtocol": "tcp", "Description": "Load balancer to target", "FromPort": 80, "GroupId": { @@ -537,6 +536,7 @@ "GroupId" ] }, + "IpProtocol": "tcp", "SourceSecurityGroupId": { "Fn::GetAtt": [ "ServiceLBSecurityGroup2EA7EDA1", @@ -659,13 +659,6 @@ "ServiceLBSecurityGrouptoawscdkcodedeployecsdgFargateServiceSecurityGroup64C2B62E8071D2502F": { "Type": "AWS::EC2::SecurityGroupEgress", "Properties": { - "GroupId": { - "Fn::GetAtt": [ - "ServiceLBSecurityGroup2EA7EDA1", - "GroupId" - ] - }, - "IpProtocol": "tcp", "Description": "Load balancer to target", "DestinationSecurityGroupId": { "Fn::GetAtt": [ @@ -674,6 +667,13 @@ ] }, "FromPort": 80, + "GroupId": { + "Fn::GetAtt": [ + "ServiceLBSecurityGroup2EA7EDA1", + "GroupId" + ] + }, + "IpProtocol": "tcp", "ToPort": 80 } }, @@ -781,9 +781,8 @@ "BlueUnhealthyHosts48919A97": { "Type": "AWS::CloudWatch::Alarm", "Properties": { - "ComparisonOperator": "GreaterThanOrEqualToThreshold", - "EvaluationPeriods": 2, "AlarmName": "aws-cdk-codedeploy-ecs-dg-Unhealthy-Hosts-Blue", + "ComparisonOperator": "GreaterThanOrEqualToThreshold", "Dimensions": [ { "Name": "LoadBalancer", @@ -846,6 +845,7 @@ } } ], + "EvaluationPeriods": 2, "MetricName": "UnHealthyHostCount", "Namespace": "AWS/ApplicationELB", "Period": 300, @@ -856,9 +856,8 @@ "Blue5xx7E9798A6": { "Type": "AWS::CloudWatch::Alarm", "Properties": { - "ComparisonOperator": "GreaterThanOrEqualToThreshold", - "EvaluationPeriods": 1, "AlarmName": "aws-cdk-codedeploy-ecs-dg-Http-500-Blue", + "ComparisonOperator": "GreaterThanOrEqualToThreshold", "Dimensions": [ { "Name": "LoadBalancer", @@ -921,6 +920,7 @@ } } ], + "EvaluationPeriods": 1, "MetricName": "HTTPCode_Target_5XX_Count", "Namespace": "AWS/ApplicationELB", "Period": 60, @@ -931,9 +931,8 @@ "GreenUnhealthyHosts8D9D09C1": { "Type": "AWS::CloudWatch::Alarm", "Properties": { - "ComparisonOperator": "GreaterThanOrEqualToThreshold", - "EvaluationPeriods": 2, "AlarmName": "aws-cdk-codedeploy-ecs-dg-Unhealthy-Hosts-Green", + "ComparisonOperator": "GreaterThanOrEqualToThreshold", "Dimensions": [ { "Name": "LoadBalancer", @@ -996,6 +995,7 @@ } } ], + "EvaluationPeriods": 2, "MetricName": "UnHealthyHostCount", "Namespace": "AWS/ApplicationELB", "Period": 300, @@ -1006,9 +1006,8 @@ "Green5xx1A511A06": { "Type": "AWS::CloudWatch::Alarm", "Properties": { - "ComparisonOperator": "GreaterThanOrEqualToThreshold", - "EvaluationPeriods": 1, "AlarmName": "aws-cdk-codedeploy-ecs-dg-Http-500-Green", + "ComparisonOperator": "GreaterThanOrEqualToThreshold", "Dimensions": [ { "Name": "LoadBalancer", @@ -1071,6 +1070,7 @@ } } ], + "EvaluationPeriods": 1, "MetricName": "HTTPCode_Target_5XX_Count", "Namespace": "AWS/ApplicationELB", "Period": 60, @@ -1137,15 +1137,6 @@ "BlueGreenDG373AB9B0": { "Type": "AWS::CodeDeploy::DeploymentGroup", "Properties": { - "ApplicationName": { - "Ref": "BlueGreenDGApplication3649479D" - }, - "ServiceRoleArn": { - "Fn::GetAtt": [ - "BlueGreenDGServiceRole33E3BCAC", - "Arn" - ] - }, "AlarmConfiguration": { "Alarms": [ { @@ -1169,7 +1160,10 @@ } } ], - "Enabled": true + "Enabled": false + }, + "ApplicationName": { + "Ref": "BlueGreenDGApplication3649479D" }, "AutoRollbackConfiguration": { "Enabled": true, @@ -1246,6 +1240,12 @@ } } ] + }, + "ServiceRoleArn": { + "Fn::GetAtt": [ + "BlueGreenDGServiceRole33E3BCAC", + "Arn" + ] } }, "DependsOn": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.js.snapshot/cdk.out index f0b901e7c06e5..2313ab5436501 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"32.0.0"} \ No newline at end of file +{"version":"34.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.js.snapshot/integ.json index d10ac3bae19ec..543faf986acd9 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "32.0.0", + "version": "34.0.0", "testCases": { "EcsDeploymentGroupTest/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.js.snapshot/manifest.json index 2ac61ce54d5a8..7bdb333ff5afc 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "32.0.0", + "version": "34.0.0", "artifacts": { "aws-cdk-codedeploy-ecs-dg.assets": { "type": "cdk:asset-manifest", @@ -17,7 +17,7 @@ "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}/54ea34edd18b9383781f88fd1ab5487b7d2a4ca076f0a365fa77e3b3a4b109d9.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/710f6bc445077db08ceffaf64861f978b37344d19f910739818890c51a58f0d9.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.js.snapshot/tree.json index b5cdc1e7eed0e..8f35257767a2c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.js.snapshot/tree.json @@ -31,8 +31,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" } }, "PublicSubnet1": { @@ -45,9 +45,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "VPCB9E5F0B4" - }, "availabilityZone": { "Fn::Select": [ 0, @@ -71,20 +68,23 @@ "key": "Name", "value": "aws-cdk-codedeploy-ecs-dg/VPC/PublicSubnet1" } - ] + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-cdk-codedeploy-ecs-dg/VPC/PublicSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -93,20 +93,20 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "VPCB9E5F0B4" - }, "tags": [ { "key": "Name", "value": "aws-cdk-codedeploy-ecs-dg/VPC/PublicSubnet1" } - ] + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -124,8 +124,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -134,18 +134,18 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { - "routeTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, "destinationCidrBlock": "0.0.0.0/0", "gatewayId": { "Ref": "VPCIGWB7E252D3" + }, + "routeTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -164,8 +164,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -174,15 +174,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", "aws:cdk:cloudformation:props": { - "subnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, "allocationId": { "Fn::GetAtt": [ "VPCPublicSubnet1EIP6AD938E8", "AllocationId" ] }, + "subnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, "tags": [ { "key": "Name", @@ -192,14 +192,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PublicSubnet2": { @@ -212,9 +212,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "VPCB9E5F0B4" - }, "availabilityZone": { "Fn::Select": [ 1, @@ -238,20 +235,23 @@ "key": "Name", "value": "aws-cdk-codedeploy-ecs-dg/VPC/PublicSubnet2" } - ] + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-cdk-codedeploy-ecs-dg/VPC/PublicSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -260,20 +260,20 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "VPCB9E5F0B4" - }, "tags": [ { "key": "Name", "value": "aws-cdk-codedeploy-ecs-dg/VPC/PublicSubnet2" } - ] + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -291,8 +291,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -301,18 +301,18 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { - "routeTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, "destinationCidrBlock": "0.0.0.0/0", "gatewayId": { "Ref": "VPCIGWB7E252D3" + }, + "routeTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -331,8 +331,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -341,15 +341,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", "aws:cdk:cloudformation:props": { - "subnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - }, "allocationId": { "Fn::GetAtt": [ "VPCPublicSubnet2EIP4947BC00", "AllocationId" ] }, + "subnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + }, "tags": [ { "key": "Name", @@ -359,14 +359,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PrivateSubnet1": { @@ -379,9 +379,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "VPCB9E5F0B4" - }, "availabilityZone": { "Fn::Select": [ 0, @@ -405,20 +402,23 @@ "key": "Name", "value": "aws-cdk-codedeploy-ecs-dg/VPC/PrivateSubnet1" } - ] + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-cdk-codedeploy-ecs-dg/VPC/PrivateSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -427,20 +427,20 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "VPCB9E5F0B4" - }, "tags": [ { "key": "Name", "value": "aws-cdk-codedeploy-ecs-dg/VPC/PrivateSubnet1" } - ] + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -458,8 +458,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -468,24 +468,24 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { - "routeTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, "destinationCidrBlock": "0.0.0.0/0", "natGatewayId": { "Ref": "VPCPublicSubnet1NATGatewayE0556630" + }, + "routeTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "PrivateSubnet2": { @@ -498,9 +498,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "VPCB9E5F0B4" - }, "availabilityZone": { "Fn::Select": [ 1, @@ -524,20 +521,23 @@ "key": "Name", "value": "aws-cdk-codedeploy-ecs-dg/VPC/PrivateSubnet2" } - ] + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-cdk-codedeploy-ecs-dg/VPC/PrivateSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -546,20 +546,20 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "VPCB9E5F0B4" - }, "tags": [ { "key": "Name", "value": "aws-cdk-codedeploy-ecs-dg/VPC/PrivateSubnet2" } - ] + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -577,8 +577,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -587,24 +587,24 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { - "routeTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, "destinationCidrBlock": "0.0.0.0/0", "natGatewayId": { "Ref": "VPCPublicSubnet2NATGateway3C070193" + }, + "routeTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "IGW": { @@ -622,8 +622,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" } }, "VPCGW": { @@ -632,23 +632,23 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::VPCGatewayAttachment", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "VPCB9E5F0B4" - }, "internetGatewayId": { "Ref": "VPCIGWB7E252D3" + }, + "vpcId": { + "Ref": "VPCB9E5F0B4" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0" } }, "EcsCluster": { @@ -663,14 +663,14 @@ "aws:cdk:cloudformation:props": {} }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ecs.Cluster", + "version": "0.0.0" } }, "TaskDef": { @@ -685,8 +685,8 @@ "id": "ImportTaskRole", "path": "aws-cdk-codedeploy-ecs-dg/TaskDef/TaskRole/ImportTaskRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -710,14 +710,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -755,22 +755,22 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", + "version": "0.0.0" } }, "Container": { "id": "Container", "path": "aws-cdk-codedeploy-ecs-dg/TaskDef/Container", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", + "version": "0.0.0" } }, "FargateService": { @@ -830,8 +830,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ecs.CfnService", + "version": "0.0.0" } }, "SecurityGroup": { @@ -858,8 +858,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } }, "from awscdkcodedeployecsdgServiceLBSecurityGroupEC967688:80": { @@ -868,7 +868,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroupIngress", "aws:cdk:cloudformation:props": { - "ipProtocol": "tcp", "description": "Load balancer to target", "fromPort": 80, "groupId": { @@ -877,6 +876,7 @@ "GroupId" ] }, + "ipProtocol": "tcp", "sourceSecurityGroupId": { "Fn::GetAtt": [ "ServiceLBSecurityGroup2EA7EDA1", @@ -887,20 +887,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroupIngress", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ecs.FargateService", + "version": "0.0.0" } }, "TaskDef2": { @@ -915,8 +915,8 @@ "id": "ImportTaskRole", "path": "aws-cdk-codedeploy-ecs-dg/TaskDef2/TaskRole/ImportTaskRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -940,14 +940,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -985,22 +985,22 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", + "version": "0.0.0" } }, "Container": { "id": "Container", "path": "aws-cdk-codedeploy-ecs-dg/TaskDef2/Container", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", + "version": "0.0.0" } }, "ServiceLB": { @@ -1040,8 +1040,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnLoadBalancer", + "version": "0.0.0" } }, "SecurityGroup": { @@ -1077,8 +1077,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } }, "to awscdkcodedeployecsdgFargateServiceSecurityGroup64C2B62E:80": { @@ -1087,13 +1087,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroupEgress", "aws:cdk:cloudformation:props": { - "groupId": { - "Fn::GetAtt": [ - "ServiceLBSecurityGroup2EA7EDA1", - "GroupId" - ] - }, - "ipProtocol": "tcp", "description": "Load balancer to target", "destinationSecurityGroupId": { "Fn::GetAtt": [ @@ -1102,18 +1095,25 @@ ] }, "fromPort": 80, + "groupId": { + "Fn::GetAtt": [ + "ServiceLBSecurityGroup2EA7EDA1", + "GroupId" + ] + }, + "ipProtocol": "tcp", "toPort": 80 } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroupEgress", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } }, "ProdListener": { @@ -1142,8 +1142,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnListener", + "version": "0.0.0" } }, "BlueTGGroup": { @@ -1182,20 +1182,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnTargetGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationTargetGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListener", + "version": "0.0.0" } }, "TestListener": { @@ -1224,20 +1224,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnListener", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListener", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer", + "version": "0.0.0" } }, "GreenTG": { @@ -1276,14 +1276,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnTargetGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationTargetGroup", + "version": "0.0.0" } }, "BlueUnhealthyHosts": { @@ -1296,9 +1296,8 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm", "aws:cdk:cloudformation:props": { - "comparisonOperator": "GreaterThanOrEqualToThreshold", - "evaluationPeriods": 2, "alarmName": "aws-cdk-codedeploy-ecs-dg-Unhealthy-Hosts-Blue", + "comparisonOperator": "GreaterThanOrEqualToThreshold", "dimensions": [ { "name": "LoadBalancer", @@ -1361,6 +1360,7 @@ } } ], + "evaluationPeriods": 2, "metricName": "UnHealthyHostCount", "namespace": "AWS/ApplicationELB", "period": 300, @@ -1369,14 +1369,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", + "version": "0.0.0" } }, "Blue5xx": { @@ -1389,9 +1389,8 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm", "aws:cdk:cloudformation:props": { - "comparisonOperator": "GreaterThanOrEqualToThreshold", - "evaluationPeriods": 1, "alarmName": "aws-cdk-codedeploy-ecs-dg-Http-500-Blue", + "comparisonOperator": "GreaterThanOrEqualToThreshold", "dimensions": [ { "name": "LoadBalancer", @@ -1454,6 +1453,7 @@ } } ], + "evaluationPeriods": 1, "metricName": "HTTPCode_Target_5XX_Count", "namespace": "AWS/ApplicationELB", "period": 60, @@ -1462,14 +1462,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", + "version": "0.0.0" } }, "GreenUnhealthyHosts": { @@ -1482,9 +1482,8 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm", "aws:cdk:cloudformation:props": { - "comparisonOperator": "GreaterThanOrEqualToThreshold", - "evaluationPeriods": 2, "alarmName": "aws-cdk-codedeploy-ecs-dg-Unhealthy-Hosts-Green", + "comparisonOperator": "GreaterThanOrEqualToThreshold", "dimensions": [ { "name": "LoadBalancer", @@ -1547,6 +1546,7 @@ } } ], + "evaluationPeriods": 2, "metricName": "UnHealthyHostCount", "namespace": "AWS/ApplicationELB", "period": 300, @@ -1555,14 +1555,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", + "version": "0.0.0" } }, "Green5xx": { @@ -1575,9 +1575,8 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm", "aws:cdk:cloudformation:props": { - "comparisonOperator": "GreaterThanOrEqualToThreshold", - "evaluationPeriods": 1, "alarmName": "aws-cdk-codedeploy-ecs-dg-Http-500-Green", + "comparisonOperator": "GreaterThanOrEqualToThreshold", "dimensions": [ { "name": "LoadBalancer", @@ -1640,6 +1639,7 @@ } } ], + "evaluationPeriods": 1, "metricName": "HTTPCode_Target_5XX_Count", "namespace": "AWS/ApplicationELB", "period": 60, @@ -1648,14 +1648,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", + "version": "0.0.0" } }, "CanaryConfig": { @@ -1679,14 +1679,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_codedeploy.CfnDeploymentConfig", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_codedeploy.EcsDeploymentConfig", + "version": "0.0.0" } }, "BlueGreenDG": { @@ -1701,8 +1701,8 @@ "id": "ImportServiceRole", "path": "aws-cdk-codedeploy-ecs-dg/BlueGreenDG/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1740,14 +1740,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Application": { @@ -1764,14 +1764,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_codedeploy.CfnApplication", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_codedeploy.EcsApplication", + "version": "0.0.0" } }, "Resource": { @@ -1780,15 +1780,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::CodeDeploy::DeploymentGroup", "aws:cdk:cloudformation:props": { - "applicationName": { - "Ref": "BlueGreenDGApplication3649479D" - }, - "serviceRoleArn": { - "Fn::GetAtt": [ - "BlueGreenDGServiceRole33E3BCAC", - "Arn" - ] - }, "alarmConfiguration": { "alarms": [ { @@ -1812,7 +1803,10 @@ } } ], - "enabled": true + "enabled": false + }, + "applicationName": { + "Ref": "BlueGreenDGApplication3649479D" }, "autoRollbackConfiguration": { "enabled": true, @@ -1889,88 +1883,94 @@ } } ] + }, + "serviceRoleArn": { + "Fn::GetAtt": [ + "BlueGreenDGServiceRole33E3BCAC", + "Arn" + ] } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_codedeploy.CfnDeploymentGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.aws_codedeploy.EcsDeploymentGroup", + "version": "0.0.0" } }, "NewTaskDefinition": { "id": "NewTaskDefinition", "path": "aws-cdk-codedeploy-ecs-dg/NewTaskDefinition", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" } }, "Subnet1Id": { "id": "Subnet1Id", "path": "aws-cdk-codedeploy-ecs-dg/Subnet1Id", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" } }, "Subnet2Id": { "id": "Subnet2Id", "path": "aws-cdk-codedeploy-ecs-dg/Subnet2Id", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" } }, "SecurityGroupId": { "id": "SecurityGroupId", "path": "aws-cdk-codedeploy-ecs-dg/SecurityGroupId", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" } }, "CodeDeployApplicationName": { "id": "CodeDeployApplicationName", "path": "aws-cdk-codedeploy-ecs-dg/CodeDeployApplicationName", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" } }, "CodeDeployDeploymentGroupName": { "id": "CodeDeployDeploymentGroupName", "path": "aws-cdk-codedeploy-ecs-dg/CodeDeployDeploymentGroupName", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "aws-cdk-codedeploy-ecs-dg/BootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "aws-cdk-codedeploy-ecs-dg/CheckBootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" } }, "EcsDeploymentGroupTest": { @@ -1986,7 +1986,7 @@ "path": "EcsDeploymentGroupTest/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.55" + "version": "10.2.70" } }, "DeployAssert": { @@ -1997,22 +1997,22 @@ "id": "BootstrapVersion", "path": "EcsDeploymentGroupTest/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "EcsDeploymentGroupTest/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" } } }, @@ -2032,13 +2032,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.55" + "version": "10.2.70" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.2.55" + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.ts index 2d93b158cd709..bef7582148d71 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/ecs/integ.deployment-group.ts @@ -222,6 +222,7 @@ const dg = new codedeploy.EcsDeploymentGroup(stack, 'BlueGreenDG', { autoRollback: { stoppedDeployment: true, }, + ignoreAlarmConfiguration: true, }); // Outputs to use for manual testing diff --git a/packages/aws-cdk-lib/aws-codedeploy/README.md b/packages/aws-cdk-lib/aws-codedeploy/README.md index 2d1f959923cff..752efc73ad526 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/README.md +++ b/packages/aws-cdk-lib/aws-codedeploy/README.md @@ -90,6 +90,9 @@ const deploymentGroup = new codedeploy.ServerDeploymentGroup(this, 'CodeDeployDe // whether to ignore failure to fetch the status of alarms from CloudWatch // default: false ignorePollAlarmsFailure: false, + // whether to skip the step of checking CloudWatch alarms during the deployment process + // default: false + ignoreAlarmConfiguration: false, // auto-rollback configuration autoRollback: { failedDeployment: true, // default: true diff --git a/packages/aws-cdk-lib/aws-codedeploy/lib/ecs/deployment-group.ts b/packages/aws-cdk-lib/aws-codedeploy/lib/ecs/deployment-group.ts index 3b1f29cd525b3..9ff4b247952f4 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/lib/ecs/deployment-group.ts +++ b/packages/aws-cdk-lib/aws-codedeploy/lib/ecs/deployment-group.ts @@ -178,6 +178,13 @@ export interface EcsDeploymentGroupProps { * @default - default AutoRollbackConfig. */ readonly autoRollback?: AutoRollbackConfig; + + /** + * Whether to skip the step of checking CloudWatch alarms during the deployment process + * + * @default - false + */ + readonly ignoreAlarmConfiguration?: boolean; } /** @@ -261,7 +268,12 @@ export class EcsDeploymentGroup extends DeploymentGroupBase implements IEcsDeplo }), loadBalancerInfo: cdk.Lazy.any({ produce: () => this.renderLoadBalancerInfo(props.blueGreenDeploymentConfig) }), alarmConfiguration: cdk.Lazy.any({ - produce: () => renderAlarmConfiguration(this.alarms, props.ignorePollAlarmsFailure, removeAlarmsFromDeploymentGroup), + produce: () => renderAlarmConfiguration({ + alarms: this.alarms, + ignorePollAlarmFailure: props.ignorePollAlarmsFailure, + removeAlarms: removeAlarmsFromDeploymentGroup, + ignoreAlarmConfiguration: props.ignoreAlarmConfiguration, + }), }), autoRollbackConfiguration: cdk.Lazy.any({ produce: () => renderAutoRollbackConfiguration(this.alarms, props.autoRollback) }), }); diff --git a/packages/aws-cdk-lib/aws-codedeploy/lib/lambda/deployment-group.ts b/packages/aws-cdk-lib/aws-codedeploy/lib/lambda/deployment-group.ts index 6818f643f7ad3..86f6134e62151 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/lib/lambda/deployment-group.ts +++ b/packages/aws-cdk-lib/aws-codedeploy/lib/lambda/deployment-group.ts @@ -117,6 +117,13 @@ export interface LambdaDeploymentGroupProps { * @default - default AutoRollbackConfig. */ readonly autoRollback?: AutoRollbackConfig; + + /** + * Whether to skip the step of checking CloudWatch alarms during the deployment process + * + * @default - false + */ + readonly ignoreAlarmConfiguration?: boolean; } /** @@ -177,7 +184,12 @@ export class LambdaDeploymentGroup extends DeploymentGroupBase implements ILambd deploymentOption: 'WITH_TRAFFIC_CONTROL', }, alarmConfiguration: cdk.Lazy.any({ - produce: () => renderAlarmConfiguration(this.alarms, props.ignorePollAlarmsFailure, removeAlarmsFromDeploymentGroup), + produce: () => renderAlarmConfiguration({ + alarms: this.alarms, + ignorePollAlarmFailure: props.ignorePollAlarmsFailure, + removeAlarms: removeAlarmsFromDeploymentGroup, + ignoreAlarmConfiguration: props.ignoreAlarmConfiguration, + }), }), autoRollbackConfiguration: cdk.Lazy.any({ produce: () => renderAutoRollbackConfiguration(this.alarms, props.autoRollback) }), }); diff --git a/packages/aws-cdk-lib/aws-codedeploy/lib/private/utils.ts b/packages/aws-cdk-lib/aws-codedeploy/lib/private/utils.ts index f1c3f0fb844b0..0b9ae20ae3df1 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/lib/private/utils.ts +++ b/packages/aws-cdk-lib/aws-codedeploy/lib/private/utils.ts @@ -31,22 +31,50 @@ export function arnForDeploymentConfig(name: string, resource?: IResource): stri }); } -export function renderAlarmConfiguration(alarms: cloudwatch.IAlarm[], ignorePollAlarmFailure: boolean | undefined, removeAlarms = true): -CfnDeploymentGroup.AlarmConfigurationProperty | undefined { +export interface renderAlarmConfigProps { + /** + * Array of Cloudwatch alarms + */ + readonly alarms: cloudwatch.IAlarm[]; + + /** + * Whether to ignore failure to fetch the status of alarms from CloudWatch + */ + readonly ignorePollAlarmFailure?: boolean; + + /** + * When no alarms are provided on an update, removes previously existing alarms from the construct. + * @see {@link https://github.com/aws/aws-cdk/blob/main/packages/%40aws-cdk/cx-api/FEATURE_FLAGS.md#aws-cdkaws-codedeployremovealarmsfromdeploymentgroup} + * + * @default true + */ + readonly removeAlarms?: boolean; + + /** + * Whether to skip the step of checking CloudWatch alarms during the deployment process + * + * @default false + */ + ignoreAlarmConfiguration?: boolean; +} + +export function renderAlarmConfiguration(props: renderAlarmConfigProps): CfnDeploymentGroup.AlarmConfigurationProperty | undefined { + const ignoreAlarmConfiguration = props.ignoreAlarmConfiguration ?? false; + const removeAlarms = props.removeAlarms ?? true; if (removeAlarms) { return { - alarms: alarms.length > 0 ? alarms.map(a => ({ name: a.alarmName })) : undefined, - enabled: alarms.length > 0, - ignorePollAlarmFailure, + alarms: props.alarms.length > 0 ? props.alarms.map(a => ({ name: a.alarmName })) : undefined, + enabled: !ignoreAlarmConfiguration && props.alarms.length > 0, + ignorePollAlarmFailure: props.ignorePollAlarmFailure, }; } - return alarms.length === 0 + return props.alarms.length === 0 ? undefined : { - alarms: alarms.map(a => ({ name: a.alarmName })), - enabled: true, - ignorePollAlarmFailure, + alarms: props.alarms.map(a => ({ name: a.alarmName })), + enabled: !ignoreAlarmConfiguration, + ignorePollAlarmFailure: props.ignorePollAlarmFailure, }; } diff --git a/packages/aws-cdk-lib/aws-codedeploy/lib/server/deployment-group.ts b/packages/aws-cdk-lib/aws-codedeploy/lib/server/deployment-group.ts index 958e46468ba92..f2ca41f1f74b8 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/lib/server/deployment-group.ts +++ b/packages/aws-cdk-lib/aws-codedeploy/lib/server/deployment-group.ts @@ -220,6 +220,13 @@ export interface ServerDeploymentGroupProps { * @default - default AutoRollbackConfig. */ readonly autoRollback?: AutoRollbackConfig; + + /** + * Whether to skip the step of checking CloudWatch alarms during the deployment process + * + * @default - false + */ + readonly ignoreAlarmConfiguration?: boolean; } /** @@ -303,7 +310,12 @@ export class ServerDeploymentGroup extends DeploymentGroupBase implements IServe ec2TagSet: this.ec2TagSet(props.ec2InstanceTags), onPremisesTagSet: this.onPremiseTagSet(props.onPremiseInstanceTags), alarmConfiguration: cdk.Lazy.any({ - produce: () => renderAlarmConfiguration(this.alarms, props.ignorePollAlarmsFailure, removeAlarmsFromDeploymentGroup), + produce: () => renderAlarmConfiguration({ + alarms: this.alarms, + ignorePollAlarmFailure: props.ignorePollAlarmsFailure, + removeAlarms: removeAlarmsFromDeploymentGroup, + ignoreAlarmConfiguration: props.ignoreAlarmConfiguration, + }), }), autoRollbackConfiguration: cdk.Lazy.any({ produce: () => renderAutoRollbackConfiguration(this.alarms, props.autoRollback) }), }); diff --git a/packages/aws-cdk-lib/aws-codedeploy/test/ecs/deployment-group.test.ts b/packages/aws-cdk-lib/aws-codedeploy/test/ecs/deployment-group.test.ts index dc8a4539b4c7e..ff244b80f66fc 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/test/ecs/deployment-group.test.ts +++ b/packages/aws-cdk-lib/aws-codedeploy/test/ecs/deployment-group.test.ts @@ -884,4 +884,64 @@ describe('CodeDeploy ECS DeploymentGroup', () => { )); }); }); + + test('can ignore alarm status when alarms are present', () => { + const stack = new cdk.Stack(); + new codedeploy.EcsDeploymentGroup(stack, 'MyDG', { + ignoreAlarmConfiguration: true, + alarms: [ + new cloudwatch.Alarm(stack, 'BlueTGUnHealthyHosts', { + metric: new cloudwatch.Metric({ + namespace: 'AWS/ApplicationELB', + metricName: 'UnHealthyHostCount', + }), + threshold: 1, + evaluationPeriods: 1, + }), + ], + service: mockEcsService(stack), + blueGreenDeploymentConfig: { + blueTargetGroup: mockTargetGroup(stack, 'blue'), + greenTargetGroup: mockTargetGroup(stack, 'green'), + listener: mockListener(stack, 'prod'), + }, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::CodeDeploy::DeploymentGroup', { + AlarmConfiguration: { + Enabled: false, + }, + }); + }); + + test('alarms not enabled when removeAlarms is passed with ignoreAlarmConfiguration', () => { + const stack = new cdk.Stack(); + stack.node.setContext('@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup', true); + + new codedeploy.EcsDeploymentGroup(stack, 'MyDG', { + ignoreAlarmConfiguration: true, + alarms: [ + new cloudwatch.Alarm(stack, 'BlueTGUnHealthyHosts', { + metric: new cloudwatch.Metric({ + namespace: 'AWS/ApplicationELB', + metricName: 'UnHealthyHostCount', + }), + threshold: 1, + evaluationPeriods: 1, + }), + ], + service: mockEcsService(stack), + blueGreenDeploymentConfig: { + blueTargetGroup: mockTargetGroup(stack, 'blue'), + greenTargetGroup: mockTargetGroup(stack, 'green'), + listener: mockListener(stack, 'prod'), + }, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::CodeDeploy::DeploymentGroup', { + AlarmConfiguration: { + Enabled: false, + }, + }); + }); }); diff --git a/packages/aws-cdk-lib/aws-codedeploy/test/lambda/deployment-group.test.ts b/packages/aws-cdk-lib/aws-codedeploy/test/lambda/deployment-group.test.ts index f3fe863b088e1..c3a7c5110fa00 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/test/lambda/deployment-group.test.ts +++ b/packages/aws-cdk-lib/aws-codedeploy/test/lambda/deployment-group.test.ts @@ -652,6 +652,58 @@ describe('CodeDeploy Lambda DeploymentGroup', () => { )); }); }); + + test('can ignore alarm status when alarms are present', () => { + const stack = new cdk.Stack(); + const application = new codedeploy.LambdaApplication(stack, 'MyApp'); + const alias = mockAlias(stack); + new codedeploy.LambdaDeploymentGroup(stack, 'MyDG', { + application, + alias, + postHook: mockFunction(stack, 'PostHook'), + deploymentConfig: codedeploy.LambdaDeploymentConfig.ALL_AT_ONCE, + ignoreAlarmConfiguration: true, + alarms: [new cloudwatch.Alarm(stack, 'Failures', { + metric: alias.metricErrors(), + comparisonOperator: cloudwatch.ComparisonOperator.GREATER_THAN_THRESHOLD, + threshold: 1, + evaluationPeriods: 1, + })], + }); + + Template.fromStack(stack).hasResourceProperties('AWS::CodeDeploy::DeploymentGroup', { + AlarmConfiguration: { + Enabled: false, + }, + }); + }); + + test('alarms not enabled when removeAlarms is passed with ignoreAlarmConfiguration', () => { + const stack = new cdk.Stack(); + stack.node.setContext('@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup', true); + + const application = new codedeploy.LambdaApplication(stack, 'MyApp'); + const alias = mockAlias(stack); + new codedeploy.LambdaDeploymentGroup(stack, 'MyDG', { + application, + alias, + postHook: mockFunction(stack, 'PostHook'), + deploymentConfig: codedeploy.LambdaDeploymentConfig.ALL_AT_ONCE, + ignoreAlarmConfiguration: true, + alarms: [new cloudwatch.Alarm(stack, 'Failures', { + metric: alias.metricErrors(), + comparisonOperator: cloudwatch.ComparisonOperator.GREATER_THAN_THRESHOLD, + threshold: 1, + evaluationPeriods: 1, + })], + }); + + Template.fromStack(stack).hasResourceProperties('AWS::CodeDeploy::DeploymentGroup', { + AlarmConfiguration: { + Enabled: false, + }, + }); + }); }); describe('imported with fromLambdaDeploymentGroupAttributes', () => { diff --git a/packages/aws-cdk-lib/aws-codedeploy/test/server/deployment-group.test.ts b/packages/aws-cdk-lib/aws-codedeploy/test/server/deployment-group.test.ts index c01b242ffe7b6..8b5e0d85c3b8d 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/test/server/deployment-group.test.ts +++ b/packages/aws-cdk-lib/aws-codedeploy/test/server/deployment-group.test.ts @@ -630,4 +630,53 @@ describe('CodeDeploy Server Deployment Group', () => { )); }); }); + + test('can ignore alarm status when alarms are present', () => { + const stack = new cdk.Stack(); + + new codedeploy.ServerDeploymentGroup(stack, 'DeploymentGroup', { + alarms: [ + new cloudwatch.Alarm(stack, 'Alarm1', { + metric: new cloudwatch.Metric({ + metricName: 'Errors', + namespace: 'my.namespace', + }), + threshold: 1, + evaluationPeriods: 1, + }), + ], + ignoreAlarmConfiguration: true, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::CodeDeploy::DeploymentGroup', { + AlarmConfiguration: { + Enabled: false, + }, + }); + }); + + test('alarms not enabled when removeAlarms is passed with ignoreAlarmConfiguration', () => { + const stack = new cdk.Stack(); + stack.node.setContext('@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup', true); + + new codedeploy.ServerDeploymentGroup(stack, 'DeploymentGroup', { + alarms: [ + new cloudwatch.Alarm(stack, 'Alarm1', { + metric: new cloudwatch.Metric({ + metricName: 'Errors', + namespace: 'my.namespace', + }), + threshold: 1, + evaluationPeriods: 1, + }), + ], + ignoreAlarmConfiguration: true, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::CodeDeploy::DeploymentGroup', { + AlarmConfiguration: { + Enabled: false, + }, + }); + }); });