From 28e87bf3601d5a287897555b7398d26bdc5b30d4 Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Sun, 2 Jun 2024 22:27:15 +0900 Subject: [PATCH 01/23] chore: add comments --- .../lib/base-deployment-config.ts | 47 ++++++++++++++++++- .../aws-codedeploy/lib/host-health-config.ts | 39 +++++++++++++++ .../lib/server/deployment-config.ts | 14 +++++- 3 files changed, 96 insertions(+), 4 deletions(-) diff --git a/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts b/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts index 73acefeebd238..29ef303620d03 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts +++ b/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts @@ -1,9 +1,9 @@ import { Construct } from 'constructs'; import { CfnDeploymentConfig } from './codedeploy.generated'; -import { MinimumHealthyHosts } from './host-health-config'; +import { MinimumHealthyHosts, MinimumHealthyHostsPerZone } from './host-health-config'; import { arnForDeploymentConfig, validateName } from './private/utils'; import { TrafficRouting } from './traffic-routing-config'; -import { ArnFormat, Resource, Stack } from '../../core'; +import { ArnFormat, Duration, Resource, Stack } from '../../core'; /** * The base class for ServerDeploymentConfig, EcsDeploymentConfig, @@ -54,6 +54,35 @@ export enum ComputePlatform { ECS = 'ECS', } +/** + * Configuration for CodeDeploy to deploy your application to one Availability Zone at a time within an AWS Region. + */ +export interface ZonalConfig { + /** + * The period of time that CodeDeploy must wait after completing a deployment to an Availability Zone. + * + * @default - CodeDeploy starts deploying to the next Availability Zone immediately + */ + readonly monitorDuration?: Duration; + + /** + * The period of time that CodeDeploy must wait after completing a deployment to the first Availability Zone. + * + * @default - the same value as `monitorDuration` + */ + readonly firstZoneMonitorDuration?: Duration; + + /** + * The number or percentage of instances that must remain available per Availability Zone during a deployment. + * This option works in conjunction with the `minimumHealthyHosts` option. + * + * @see https://docs.aws.amazon.com/codedeploy/latest/userguide/instances-health.html#minimum-healthy-hosts-az + * + * @default - 0 percent + */ + readonly minimumHealthyHostsPerZone?: MinimumHealthyHostsPerZone; +} + /** * Complete base deployment config properties that are required to be supplied by the implementation * of the BaseDeploymentConfig class. @@ -78,6 +107,15 @@ export interface BaseDeploymentConfigProps extends BaseDeploymentConfigOptions { * @default None */ readonly minimumHealthyHosts?: MinimumHealthyHosts; + + /** + * Configure CodeDeploy to deploy your application to one Availability Zone at a time within an AWS Region. + * + * @see https://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-configurations-create.html#zonal-config + * + * @default - deploy your application to a random selection of hosts across a Region + */ + readonly zonalConfig?: ZonalConfig; } /** @@ -141,6 +179,11 @@ export abstract class BaseDeploymentConfig extends Resource implements IBaseDepl computePlatform: props?.computePlatform, trafficRoutingConfig: props?.trafficRouting?.bind(this), minimumHealthyHosts: props?.minimumHealthyHosts?._json, + zonalConfig: props?.zonalConfig ? { + monitorDurationInSeconds: props.zonalConfig.monitorDuration?.toSeconds(), + firstZoneMonitorDurationInSeconds: props.zonalConfig.firstZoneMonitorDuration?.toSeconds(), + minimumHealthyHostsPerZone: props.zonalConfig.minimumHealthyHostsPerZone?._json, + } : undefined, }); this.deploymentConfigName = this.getResourceNameAttribute(resource.ref); diff --git a/packages/aws-cdk-lib/aws-codedeploy/lib/host-health-config.ts b/packages/aws-cdk-lib/aws-codedeploy/lib/host-health-config.ts index 26117518ed090..334b7ad28531d 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/lib/host-health-config.ts +++ b/packages/aws-cdk-lib/aws-codedeploy/lib/host-health-config.ts @@ -34,3 +34,42 @@ export class MinimumHealthyHosts { return this.json; } } + +/** + * Minimum number of healthy hosts per availability zone for a server deployment. + */ +export class MinimumHealthyHostsPerZone { + + /** + * The minimum healhty hosts threshold expressed as an absolute number. + */ + public static count(value: number): MinimumHealthyHostsPerZone { + return new MinimumHealthyHostsPerZone({ + type: 'HOST_COUNT', + value, + }); + } + + /** + * The minmum healhty hosts threshold expressed as a percentage of the fleet. + */ + public static percentage(value: number): MinimumHealthyHostsPerZone { + return new MinimumHealthyHostsPerZone({ + type: 'FLEET_PERCENT', + value, + }); + } + + private constructor(private readonly json: CfnDeploymentConfig.MinimumHealthyHostsProperty) { + if (!Number.isInteger(json.value)) { + throw new Error(`The percentage or count value of minimumHealthyHostsPerZone must be an integer, got: ${json.value}`); + } + } + + /** + * @internal + */ + public get _json() { + return this.json; + } +} diff --git a/packages/aws-cdk-lib/aws-codedeploy/lib/server/deployment-config.ts b/packages/aws-cdk-lib/aws-codedeploy/lib/server/deployment-config.ts index e9b294678fdcf..7845cdba9cbf5 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/lib/server/deployment-config.ts +++ b/packages/aws-cdk-lib/aws-codedeploy/lib/server/deployment-config.ts @@ -1,5 +1,5 @@ import { Construct } from 'constructs'; -import { BaseDeploymentConfig, BaseDeploymentConfigOptions, IBaseDeploymentConfig } from '../base-deployment-config'; +import { BaseDeploymentConfig, BaseDeploymentConfigOptions, IBaseDeploymentConfig, ZonalConfig } from '../base-deployment-config'; import { MinimumHealthyHosts } from '../host-health-config'; import { deploymentConfig } from '../private/utils'; @@ -21,6 +21,13 @@ export interface ServerDeploymentConfigProps extends BaseDeploymentConfigOptions * Minimum number of healthy hosts. */ readonly minimumHealthyHosts: MinimumHealthyHosts; + + /** + * Configure CodeDeploy to deploy your application to one Availability Zone at a time within an AWS Region. + * + * @default - deploy your application to a random selection of hosts across a Region + */ + readonly zonalConfig?: ZonalConfig; } /** @@ -69,6 +76,9 @@ export class ServerDeploymentConfig extends BaseDeploymentConfig implements ISer } constructor(scope: Construct, id: string, props: ServerDeploymentConfigProps) { - super(scope, id, props); + super(scope, id, { + ...props, + zonalConfig: props.zonalConfig, + }); } } From ac5bd0f44431f90bbb3ded4562940a3beef889d4 Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Sun, 2 Jun 2024 22:49:27 +0900 Subject: [PATCH 02/23] test: add integ test --- ...efaultTestDeployAssertC00E0E7C.assets.json | 19 + ...aultTestDeployAssertC00E0E7C.template.json | 36 + .../Stack.assets.json | 32 + .../Stack.template.json | 1027 +++++++++++ .../__entrypoint__.js | 155 ++ .../index.js | 1 + .../cdk.out | 1 + .../integ.json | 12 + .../manifest.json | 371 ++++ .../tree.json | 1589 +++++++++++++++++ .../integ.deployment-group-zonal-config.ts | 62 + 11 files changed, 3305 insertions(+) create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/Stack.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/Stack.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1/__entrypoint__.js create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1/index.js create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/cdk.out create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/integ.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/manifest.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/tree.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.ts diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C.assets.json new file mode 100644 index 0000000000000..685f9193ba498 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C.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-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C.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-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/Stack.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/Stack.assets.json new file mode 100644 index 0000000000000..5af58c7c647d7 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/Stack.assets.json @@ -0,0 +1,32 @@ +{ + "version": "36.0.0", + "files": { + "bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1": { + "source": { + "path": "asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "c42862b3f17a28cbbcd8ff7ee7bd4b095381dd1f511fc27ce9fcda265260432e": { + "source": { + "path": "Stack.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "c42862b3f17a28cbbcd8ff7ee7bd4b095381dd1f511fc27ce9fcda265260432e.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-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/Stack.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/Stack.template.json new file mode 100644 index 0000000000000..a0fd0659157b9 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/Stack.template.json @@ -0,0 +1,1027 @@ +{ + "Resources": { + "Vpc8378EB38": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "Stack/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": "Stack/Vpc/PublicSubnet1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPublicSubnet1RouteTable6C95E38E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "Stack/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": "Stack/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1NATGateway4D7517AA": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet1EIPD7E02669", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "Stack/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": "Stack/Vpc/PublicSubnet2" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPublicSubnet2RouteTable94F7E489": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "Stack/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": "Stack/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPublicSubnet2NATGateway9182C01D": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet2EIP3C605A87", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + }, + "Tags": [ + { + "Key": "Name", + "Value": "Stack/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": "Stack/Vpc/PrivateSubnet1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPrivateSubnet1RouteTableB2C5B500": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "Stack/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": "Stack/Vpc/PrivateSubnet2" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPrivateSubnet2RouteTableA678073B": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "Stack/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": "Stack/Vpc" + } + ] + } + }, + "VpcVPCGWBF912B6E": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "InternetGatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcRestrictDefaultSecurityGroupCustomResourceC73DA2BE": { + "Type": "Custom::VpcRestrictDefaultSG", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "CustomVpcRestrictDefaultSGCustomResourceProviderHandlerDC833E5E", + "Arn" + ] + }, + "DefaultSecurityGroupId": { + "Fn::GetAtt": [ + "Vpc8378EB38", + "DefaultSecurityGroup" + ] + }, + "Account": { + "Ref": "AWS::AccountId" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "CustomVpcRestrictDefaultSGCustomResourceProviderRole26592FE0": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ] + }, + "ManagedPolicyArns": [ + { + "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + } + ], + "Policies": [ + { + "PolicyName": "Inline", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "ec2:AuthorizeSecurityGroupIngress", + "ec2:AuthorizeSecurityGroupEgress", + "ec2:RevokeSecurityGroupIngress", + "ec2:RevokeSecurityGroupEgress" + ], + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":ec2:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":security-group/", + { + "Fn::GetAtt": [ + "Vpc8378EB38", + "DefaultSecurityGroup" + ] + } + ] + ] + } + ] + } + ] + } + } + ] + } + }, + "CustomVpcRestrictDefaultSGCustomResourceProviderHandlerDC833E5E": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1.zip" + }, + "Timeout": 900, + "MemorySize": 128, + "Handler": "__entrypoint__.handler", + "Role": { + "Fn::GetAtt": [ + "CustomVpcRestrictDefaultSGCustomResourceProviderRole26592FE0", + "Arn" + ] + }, + "Runtime": "nodejs18.x", + "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" + }, + "DependsOn": [ + "CustomVpcRestrictDefaultSGCustomResourceProviderRole26592FE0" + ] + }, + "AsgInstanceSecurityGroupC53F1492": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "Stack/Asg/InstanceSecurityGroup", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "Tags": [ + { + "Key": "Name", + "Value": "Stack/Asg" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "AsgInstanceSecurityGroupfromStackElbSecurityGroup01E7E34F80599577AC": { + "Type": "AWS::EC2::SecurityGroupIngress", + "Properties": { + "Description": "Load balancer to target", + "FromPort": 80, + "GroupId": { + "Fn::GetAtt": [ + "AsgInstanceSecurityGroupC53F1492", + "GroupId" + ] + }, + "IpProtocol": "tcp", + "SourceSecurityGroupId": { + "Fn::GetAtt": [ + "ElbSecurityGroupA4E93CA1", + "GroupId" + ] + }, + "ToPort": 80 + } + }, + "AsgInstanceRole7946982D": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "ec2.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "Tags": [ + { + "Key": "Name", + "Value": "Stack/Asg" + } + ] + } + }, + "AsgInstanceRoleDefaultPolicy16A5BCED": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::aws-codedeploy-", + { + "Ref": "AWS::Region" + }, + "/latest/*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::aws-codedeploy-", + { + "Ref": "AWS::Region" + } + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "AsgInstanceRoleDefaultPolicy16A5BCED", + "Roles": [ + { + "Ref": "AsgInstanceRole7946982D" + } + ] + } + }, + "AsgInstanceProfileBCEDB827": { + "Type": "AWS::IAM::InstanceProfile", + "Properties": { + "Roles": [ + { + "Ref": "AsgInstanceRole7946982D" + } + ] + } + }, + "AsgLaunchTemplate6027899F": { + "Type": "AWS::EC2::LaunchTemplate", + "Properties": { + "LaunchTemplateData": { + "IamInstanceProfile": { + "Arn": { + "Fn::GetAtt": [ + "AsgInstanceProfileBCEDB827", + "Arn" + ] + } + }, + "ImageId": { + "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamznamihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter" + }, + "InstanceType": "m5.large", + "Monitoring": { + "Enabled": false + }, + "SecurityGroupIds": [ + { + "Fn::GetAtt": [ + "AsgInstanceSecurityGroupC53F1492", + "GroupId" + ] + } + ], + "TagSpecifications": [ + { + "ResourceType": "instance", + "Tags": [ + { + "Key": "Name", + "Value": "Stack/Asg/LaunchTemplate" + } + ] + }, + { + "ResourceType": "volume", + "Tags": [ + { + "Key": "Name", + "Value": "Stack/Asg/LaunchTemplate" + } + ] + } + ], + "UserData": { + "Fn::Base64": { + "Fn::Join": [ + "", + [ + "#!/bin/bash\nset +e\nPKG_CMD=`which yum 2>/dev/null`\nset -e\nif [ -z \"$PKG_CMD\" ]; then\nPKG_CMD=apt-get\nelse\nPKG_CMD=yum\nfi\n$PKG_CMD update -y\nset +e\n$PKG_CMD install -y ruby2.0\nRUBY2_INSTALL=$?\nset -e\nif [ $RUBY2_INSTALL -ne 0 ]; then\n$PKG_CMD install -y ruby\nfi\nAWS_CLI_PACKAGE_NAME=awscli\nif [ \"$PKG_CMD\" = \"yum\" ]; then\nAWS_CLI_PACKAGE_NAME=aws-cli\nfi\n$PKG_CMD install -y $AWS_CLI_PACKAGE_NAME\nTMP_DIR=`mktemp -d`\ncd $TMP_DIR\naws s3 cp s3://aws-codedeploy-", + { + "Ref": "AWS::Region" + }, + "/latest/install . --region ", + { + "Ref": "AWS::Region" + }, + "\nchmod +x ./install\n./install auto\nrm -fr $TMP_DIR" + ] + ] + } + } + }, + "TagSpecifications": [ + { + "ResourceType": "launch-template", + "Tags": [ + { + "Key": "Name", + "Value": "Stack/Asg/LaunchTemplate" + } + ] + } + ] + }, + "DependsOn": [ + "AsgInstanceRoleDefaultPolicy16A5BCED", + "AsgInstanceRole7946982D" + ] + }, + "AsgASGD1D7B4E2": { + "Type": "AWS::AutoScaling::AutoScalingGroup", + "Properties": { + "LaunchTemplate": { + "LaunchTemplateId": { + "Ref": "AsgLaunchTemplate6027899F" + }, + "Version": { + "Fn::GetAtt": [ + "AsgLaunchTemplate6027899F", + "LatestVersionNumber" + ] + } + }, + "MaxSize": "1", + "MinSize": "1", + "Tags": [ + { + "Key": "Name", + "PropagateAtLaunch": true, + "Value": "Stack/Asg" + } + ], + "TargetGroupARNs": [ + { + "Ref": "ElbListenerTargetGroup04811A33" + } + ], + "VPCZoneIdentifier": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + ] + }, + "UpdatePolicy": { + "AutoScalingScheduledAction": { + "IgnoreUnmodifiedGroupSizeProperties": true + } + } + }, + "ElbA0932DBA": { + "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", + "Properties": { + "LoadBalancerAttributes": [ + { + "Key": "deletion_protection.enabled", + "Value": "false" + } + ], + "Scheme": "internal", + "SecurityGroups": [ + { + "Fn::GetAtt": [ + "ElbSecurityGroupA4E93CA1", + "GroupId" + ] + } + ], + "Subnets": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + ], + "Type": "application" + } + }, + "ElbSecurityGroupA4E93CA1": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "Automatically created Security Group for ELB StackElbE5E7CBEA", + "SecurityGroupIngress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow from anyone on port 80", + "FromPort": 80, + "IpProtocol": "tcp", + "ToPort": 80 + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "ElbSecurityGrouptoStackAsgInstanceSecurityGroup57D717728060626E13": { + "Type": "AWS::EC2::SecurityGroupEgress", + "Properties": { + "Description": "Load balancer to target", + "DestinationSecurityGroupId": { + "Fn::GetAtt": [ + "AsgInstanceSecurityGroupC53F1492", + "GroupId" + ] + }, + "FromPort": 80, + "GroupId": { + "Fn::GetAtt": [ + "ElbSecurityGroupA4E93CA1", + "GroupId" + ] + }, + "IpProtocol": "tcp", + "ToPort": 80 + } + }, + "ElbListenerD4CF62D7": { + "Type": "AWS::ElasticLoadBalancingV2::Listener", + "Properties": { + "DefaultActions": [ + { + "TargetGroupArn": { + "Ref": "ElbListenerTargetGroup04811A33" + }, + "Type": "forward" + } + ], + "LoadBalancerArn": { + "Ref": "ElbA0932DBA" + }, + "Port": 80, + "Protocol": "HTTP" + } + }, + "ElbListenerTargetGroup04811A33": { + "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", + "Properties": { + "Port": 80, + "Protocol": "HTTP", + "TargetGroupAttributes": [ + { + "Key": "stickiness.enabled", + "Value": "false" + } + ], + "TargetType": "instance", + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "DeploymentConfig4FADF16C": { + "Type": "AWS::CodeDeploy::DeploymentConfig", + "Properties": { + "MinimumHealthyHosts": { + "Type": "HOST_COUNT", + "Value": 1 + }, + "ZonalConfig": { + "FirstZoneMonitorDurationInSeconds": 60, + "MinimumHealthyHostsPerZone": { + "Type": "HOST_COUNT", + "Value": 1 + }, + "MonitorDurationInSeconds": 20 + } + } + }, + "Alarm1F9009D71": { + "Type": "AWS::CloudWatch::Alarm", + "Properties": { + "ComparisonOperator": "GreaterThanOrEqualToThreshold", + "EvaluationPeriods": 1, + "MetricName": "Errors", + "Namespace": "my.namespace", + "Period": 300, + "Statistic": "Average", + "Threshold": 1 + } + }, + "CodeDeployGroupRole1D304F7A": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "codedeploy.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSCodeDeployRole" + ] + ] + } + ] + } + }, + "CodeDeployGroupApplication13EFBDA6": { + "Type": "AWS::CodeDeploy::Application", + "Properties": { + "ComputePlatform": "Server" + } + }, + "CodeDeployGroup58220FC8": { + "Type": "AWS::CodeDeploy::DeploymentGroup", + "Properties": { + "AlarmConfiguration": { + "Alarms": [ + { + "Name": { + "Ref": "Alarm1F9009D71" + } + } + ], + "Enabled": true + }, + "ApplicationName": { + "Ref": "CodeDeployGroupApplication13EFBDA6" + }, + "AutoRollbackConfiguration": { + "Enabled": false + }, + "AutoScalingGroups": [ + { + "Ref": "AsgASGD1D7B4E2" + } + ], + "DeploymentConfigName": { + "Ref": "DeploymentConfig4FADF16C" + }, + "DeploymentStyle": { + "DeploymentOption": "WITH_TRAFFIC_CONTROL" + }, + "LoadBalancerInfo": { + "TargetGroupInfoList": [ + { + "Name": { + "Fn::GetAtt": [ + "ElbListenerTargetGroup04811A33", + "TargetGroupName" + ] + } + } + ] + }, + "ServiceRoleArn": { + "Fn::GetAtt": [ + "CodeDeployGroupRole1D304F7A", + "Arn" + ] + } + } + } + }, + "Parameters": { + "SsmParameterValueawsserviceamiamazonlinuxlatestamznamihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-gp2" + }, + "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-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1/__entrypoint__.js b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1/__entrypoint__.js new file mode 100644 index 0000000000000..02033f55cf612 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1/__entrypoint__.js @@ -0,0 +1,155 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.withRetries = exports.handler = exports.external = void 0; +const https = require("https"); +const url = require("url"); +// for unit tests +exports.external = { + sendHttpRequest: defaultSendHttpRequest, + log: defaultLog, + includeStackTraces: true, + userHandlerIndex: './index', +}; +const CREATE_FAILED_PHYSICAL_ID_MARKER = 'AWSCDK::CustomResourceProviderFramework::CREATE_FAILED'; +const MISSING_PHYSICAL_ID_MARKER = 'AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID'; +async function handler(event, context) { + const sanitizedEvent = { ...event, ResponseURL: '...' }; + exports.external.log(JSON.stringify(sanitizedEvent, undefined, 2)); + // ignore DELETE event when the physical resource ID is the marker that + // indicates that this DELETE is a subsequent DELETE to a failed CREATE + // operation. + if (event.RequestType === 'Delete' && event.PhysicalResourceId === CREATE_FAILED_PHYSICAL_ID_MARKER) { + exports.external.log('ignoring DELETE event caused by a failed CREATE event'); + await submitResponse('SUCCESS', event); + return; + } + try { + // invoke the user handler. this is intentionally inside the try-catch to + // ensure that if there is an error it's reported as a failure to + // cloudformation (otherwise cfn waits). + // eslint-disable-next-line @typescript-eslint/no-require-imports + const userHandler = require(exports.external.userHandlerIndex).handler; + const result = await userHandler(sanitizedEvent, context); + // validate user response and create the combined event + const responseEvent = renderResponse(event, result); + // submit to cfn as success + await submitResponse('SUCCESS', responseEvent); + } + catch (e) { + const resp = { + ...event, + Reason: exports.external.includeStackTraces ? e.stack : e.message, + }; + if (!resp.PhysicalResourceId) { + // special case: if CREATE fails, which usually implies, we usually don't + // have a physical resource id. in this case, the subsequent DELETE + // operation does not have any meaning, and will likely fail as well. to + // address this, we use a marker so the provider framework can simply + // ignore the subsequent DELETE. + if (event.RequestType === 'Create') { + exports.external.log('CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored'); + resp.PhysicalResourceId = CREATE_FAILED_PHYSICAL_ID_MARKER; + } + else { + // otherwise, if PhysicalResourceId is not specified, something is + // terribly wrong because all other events should have an ID. + exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`); + } + } + // this is an actual error, fail the activity altogether and exist. + await submitResponse('FAILED', resp); + } +} +exports.handler = handler; +function renderResponse(cfnRequest, handlerResponse = {}) { + // if physical ID is not returned, we have some defaults for you based + // on the request type. + const physicalResourceId = handlerResponse.PhysicalResourceId ?? cfnRequest.PhysicalResourceId ?? cfnRequest.RequestId; + // if we are in DELETE and physical ID was changed, it's an error. + if (cfnRequest.RequestType === 'Delete' && physicalResourceId !== cfnRequest.PhysicalResourceId) { + throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`); + } + // merge request event and result event (result prevails). + return { + ...cfnRequest, + ...handlerResponse, + PhysicalResourceId: physicalResourceId, + }; +} +async function submitResponse(status, event) { + const json = { + Status: status, + Reason: event.Reason ?? status, + StackId: event.StackId, + RequestId: event.RequestId, + PhysicalResourceId: event.PhysicalResourceId || MISSING_PHYSICAL_ID_MARKER, + LogicalResourceId: event.LogicalResourceId, + NoEcho: event.NoEcho, + Data: event.Data, + }; + const parsedUrl = url.parse(event.ResponseURL); + const loggingSafeUrl = `${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`; + exports.external.log('submit response to cloudformation', loggingSafeUrl, json); + const responseBody = JSON.stringify(json); + const req = { + hostname: parsedUrl.hostname, + path: parsedUrl.path, + method: 'PUT', + headers: { + 'content-type': '', + 'content-length': Buffer.byteLength(responseBody, 'utf8'), + }, + }; + const retryOptions = { + attempts: 5, + sleep: 1000, + }; + await withRetries(retryOptions, exports.external.sendHttpRequest)(req, responseBody); +} +async function defaultSendHttpRequest(options, requestBody) { + return new Promise((resolve, reject) => { + try { + const request = https.request(options, (response) => { + response.resume(); // Consume the response but don't care about it + if (!response.statusCode || response.statusCode >= 400) { + reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)); + } + else { + resolve(); + } + }); + request.on('error', reject); + request.write(requestBody); + request.end(); + } + catch (e) { + reject(e); + } + }); +} +function defaultLog(fmt, ...params) { + // eslint-disable-next-line no-console + console.log(fmt, ...params); +} +function withRetries(options, fn) { + return async (...xs) => { + let attempts = options.attempts; + let ms = options.sleep; + while (true) { + try { + return await fn(...xs); + } + catch (e) { + if (attempts-- <= 0) { + throw e; + } + await sleep(Math.floor(Math.random() * ms)); + ms *= 2; + } + } + }; +} +exports.withRetries = withRetries; +async function sleep(ms) { + return new Promise((ok) => setTimeout(ok, ms)); +} diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1/index.js new file mode 100644 index 0000000000000..013bcaffd8fe5 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1/index.js @@ -0,0 +1 @@ +"use strict";var I=Object.create;var t=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var g=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty;var G=(r,e)=>{for(var o in e)t(r,o,{get:e[o],enumerable:!0})},n=(r,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of P(e))!l.call(r,s)&&s!==o&&t(r,s,{get:()=>e[s],enumerable:!(i=y(e,s))||i.enumerable});return r};var R=(r,e,o)=>(o=r!=null?I(g(r)):{},n(e||!r||!r.__esModule?t(o,"default",{value:r,enumerable:!0}):o,r)),S=r=>n(t({},"__esModule",{value:!0}),r);var k={};G(k,{handler:()=>f});module.exports=S(k);var a=R(require("@aws-sdk/client-ec2")),u=new a.EC2({});function c(r,e){return{GroupId:r,IpPermissions:[{UserIdGroupPairs:[{GroupId:r,UserId:e}],IpProtocol:"-1"}]}}function d(r){return{GroupId:r,IpPermissions:[{IpRanges:[{CidrIp:"0.0.0.0/0"}],IpProtocol:"-1"}]}}async function f(r){let e=r.ResourceProperties.DefaultSecurityGroupId,o=r.ResourceProperties.Account;switch(r.RequestType){case"Create":return p(e,o);case"Update":return h(r);case"Delete":return m(e,o)}}async function h(r){let e=r.OldResourceProperties.DefaultSecurityGroupId,o=r.ResourceProperties.DefaultSecurityGroupId;e!==o&&(await m(e,r.ResourceProperties.Account),await p(o,r.ResourceProperties.Account))}async function p(r,e){try{await u.revokeSecurityGroupEgress(d(r))}catch(o){if(o.name!=="InvalidPermission.NotFound")throw o}try{await u.revokeSecurityGroupIngress(c(r,e))}catch(o){if(o.name!=="InvalidPermission.NotFound")throw o}}async function m(r,e){await u.authorizeSecurityGroupIngress(c(r,e)),await u.authorizeSecurityGroupEgress(d(r))}0&&(module.exports={handler}); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/cdk.out new file mode 100644 index 0000000000000..1f0068d32659a --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"36.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/integ.json new file mode 100644 index 0000000000000..2026a80ef1871 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "36.0.0", + "testCases": { + "ServerDeploymentGroupMultipleLB/DefaultTest": { + "stacks": [ + "Stack" + ], + "assertionStack": "ServerDeploymentGroupMultipleLB/DefaultTest/DeployAssert", + "assertionStackName": "ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/manifest.json new file mode 100644 index 0000000000000..230d42fcdb689 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/manifest.json @@ -0,0 +1,371 @@ +{ + "version": "36.0.0", + "artifacts": { + "Stack.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "Stack.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "Stack": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "Stack.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c42862b3f17a28cbbcd8ff7ee7bd4b095381dd1f511fc27ce9fcda265260432e.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "Stack.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": [ + "Stack.assets" + ], + "metadata": { + "/Stack/Vpc/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Vpc8378EB38" + } + ], + "/Stack/Vpc/PublicSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1Subnet5C2D37C4" + } + ], + "/Stack/Vpc/PublicSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1RouteTable6C95E38E" + } + ], + "/Stack/Vpc/PublicSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1RouteTableAssociation97140677" + } + ], + "/Stack/Vpc/PublicSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1DefaultRoute3DA9E72A" + } + ], + "/Stack/Vpc/PublicSubnet1/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1EIPD7E02669" + } + ], + "/Stack/Vpc/PublicSubnet1/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1NATGateway4D7517AA" + } + ], + "/Stack/Vpc/PublicSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2Subnet691E08A3" + } + ], + "/Stack/Vpc/PublicSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2RouteTable94F7E489" + } + ], + "/Stack/Vpc/PublicSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2RouteTableAssociationDD5762D8" + } + ], + "/Stack/Vpc/PublicSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2DefaultRoute97F91067" + } + ], + "/Stack/Vpc/PublicSubnet2/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2EIP3C605A87" + } + ], + "/Stack/Vpc/PublicSubnet2/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2NATGateway9182C01D" + } + ], + "/Stack/Vpc/PrivateSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1Subnet536B997A" + } + ], + "/Stack/Vpc/PrivateSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1RouteTableB2C5B500" + } + ], + "/Stack/Vpc/PrivateSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1RouteTableAssociation70C59FA6" + } + ], + "/Stack/Vpc/PrivateSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1DefaultRouteBE02A9ED" + } + ], + "/Stack/Vpc/PrivateSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2Subnet3788AAA1" + } + ], + "/Stack/Vpc/PrivateSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2RouteTableA678073B" + } + ], + "/Stack/Vpc/PrivateSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2RouteTableAssociationA89CAD56" + } + ], + "/Stack/Vpc/PrivateSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2DefaultRoute060D2087" + } + ], + "/Stack/Vpc/IGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcIGWD7BA715C" + } + ], + "/Stack/Vpc/VPCGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcVPCGWBF912B6E" + } + ], + "/Stack/Vpc/RestrictDefaultSecurityGroupCustomResource/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcRestrictDefaultSecurityGroupCustomResourceC73DA2BE" + } + ], + "/Stack/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ + { + "type": "aws:cdk:logicalId", + "data": "CustomVpcRestrictDefaultSGCustomResourceProviderRole26592FE0" + } + ], + "/Stack/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler": [ + { + "type": "aws:cdk:logicalId", + "data": "CustomVpcRestrictDefaultSGCustomResourceProviderHandlerDC833E5E" + } + ], + "/Stack/Asg/InstanceSecurityGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "AsgInstanceSecurityGroupC53F1492" + } + ], + "/Stack/Asg/InstanceSecurityGroup/from StackElbSecurityGroup01E7E34F:80": [ + { + "type": "aws:cdk:logicalId", + "data": "AsgInstanceSecurityGroupfromStackElbSecurityGroup01E7E34F80599577AC" + } + ], + "/Stack/Asg/InstanceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "AsgInstanceRole7946982D" + } + ], + "/Stack/Asg/InstanceRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "AsgInstanceRoleDefaultPolicy16A5BCED" + } + ], + "/Stack/Asg/InstanceProfile": [ + { + "type": "aws:cdk:logicalId", + "data": "AsgInstanceProfileBCEDB827" + } + ], + "/Stack/Asg/LaunchTemplate/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "AsgLaunchTemplate6027899F" + } + ], + "/Stack/Asg/ASG": [ + { + "type": "aws:cdk:logicalId", + "data": "AsgASGD1D7B4E2" + } + ], + "/Stack/SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": [ + { + "type": "aws:cdk:logicalId", + "data": "SsmParameterValueawsserviceamiamazonlinuxlatestamznamihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter" + } + ], + "/Stack/Elb/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ElbA0932DBA" + } + ], + "/Stack/Elb/SecurityGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ElbSecurityGroupA4E93CA1" + } + ], + "/Stack/Elb/SecurityGroup/to StackAsgInstanceSecurityGroup57D71772:80": [ + { + "type": "aws:cdk:logicalId", + "data": "ElbSecurityGrouptoStackAsgInstanceSecurityGroup57D717728060626E13" + } + ], + "/Stack/Elb/Listener/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ElbListenerD4CF62D7" + } + ], + "/Stack/Elb/Listener/TargetGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ElbListenerTargetGroup04811A33" + } + ], + "/Stack/DeploymentConfig/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DeploymentConfig4FADF16C" + } + ], + "/Stack/Alarm1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Alarm1F9009D71" + } + ], + "/Stack/CodeDeployGroup/Role/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "CodeDeployGroupRole1D304F7A" + } + ], + "/Stack/CodeDeployGroup/Application/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "CodeDeployGroupApplication13EFBDA6" + } + ], + "/Stack/CodeDeployGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "CodeDeployGroup58220FC8" + } + ], + "/Stack/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/Stack/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "Stack" + }, + "ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C.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": [ + "ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C.assets" + ], + "metadata": { + "/ServerDeploymentGroupMultipleLB/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/ServerDeploymentGroupMultipleLB/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "ServerDeploymentGroupMultipleLB/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/tree.json new file mode 100644 index 0000000000000..c9bb2c8452893 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/tree.json @@ -0,0 +1,1589 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "Stack": { + "id": "Stack", + "path": "Stack", + "children": { + "Vpc": { + "id": "Vpc", + "path": "Stack/Vpc", + "children": { + "Resource": { + "id": "Resource", + "path": "Stack/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": "Stack/Vpc" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" + } + }, + "PublicSubnet1": { + "id": "PublicSubnet1", + "path": "Stack/Vpc/PublicSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "Stack/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": "Stack/Vpc/PublicSubnet1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "Stack/Vpc/PublicSubnet1/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "Stack/Vpc/PublicSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "Stack/Vpc/PublicSubnet1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "Stack/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": "Stack/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": "Stack/Vpc/PublicSubnet1/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "Stack/Vpc/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "Stack/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": "Stack/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": "Stack/Vpc/PublicSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "Stack/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": "Stack/Vpc/PublicSubnet2" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "Stack/Vpc/PublicSubnet2/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "Stack/Vpc/PublicSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "Stack/Vpc/PublicSubnet2" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "Stack/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": "Stack/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": "Stack/Vpc/PublicSubnet2/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "Stack/Vpc/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "Stack/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": "Stack/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": "Stack/Vpc/PrivateSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "Stack/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": "Stack/Vpc/PrivateSubnet1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "Stack/Vpc/PrivateSubnet1/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "Stack/Vpc/PrivateSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "Stack/Vpc/PrivateSubnet1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "Stack/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": "Stack/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": "Stack/Vpc/PrivateSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "Stack/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": "Stack/Vpc/PrivateSubnet2" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "Stack/Vpc/PrivateSubnet2/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "Stack/Vpc/PrivateSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "Stack/Vpc/PrivateSubnet2" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "Stack/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": "Stack/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": "Stack/Vpc/IGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::InternetGateway", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "Stack/Vpc" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" + } + }, + "VPCGW": { + "id": "VPCGW", + "path": "Stack/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" + } + }, + "RestrictDefaultSecurityGroupCustomResource": { + "id": "RestrictDefaultSecurityGroupCustomResource", + "path": "Stack/Vpc/RestrictDefaultSecurityGroupCustomResource", + "children": { + "Default": { + "id": "Default", + "path": "Stack/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.CustomResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0" + } + }, + "Custom::VpcRestrictDefaultSGCustomResourceProvider": { + "id": "Custom::VpcRestrictDefaultSGCustomResourceProvider", + "path": "Stack/Custom::VpcRestrictDefaultSGCustomResourceProvider", + "children": { + "Staging": { + "id": "Staging", + "path": "Stack/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", + "constructInfo": { + "fqn": "aws-cdk-lib.AssetStaging", + "version": "0.0.0" + } + }, + "Role": { + "id": "Role", + "path": "Stack/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnResource", + "version": "0.0.0" + } + }, + "Handler": { + "id": "Handler", + "path": "Stack/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.CustomResourceProviderBase", + "version": "0.0.0" + } + }, + "Asg": { + "id": "Asg", + "path": "Stack/Asg", + "children": { + "InstanceSecurityGroup": { + "id": "InstanceSecurityGroup", + "path": "Stack/Asg/InstanceSecurityGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "Stack/Asg/InstanceSecurityGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", + "aws:cdk:cloudformation:props": { + "groupDescription": "Stack/Asg/InstanceSecurityGroup", + "securityGroupEgress": [ + { + "cidrIp": "0.0.0.0/0", + "description": "Allow all outbound traffic by default", + "ipProtocol": "-1" + } + ], + "tags": [ + { + "key": "Name", + "value": "Stack/Asg" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" + } + }, + "from StackElbSecurityGroup01E7E34F:80": { + "id": "from StackElbSecurityGroup01E7E34F:80", + "path": "Stack/Asg/InstanceSecurityGroup/from StackElbSecurityGroup01E7E34F:80", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroupIngress", + "aws:cdk:cloudformation:props": { + "description": "Load balancer to target", + "fromPort": 80, + "groupId": { + "Fn::GetAtt": [ + "AsgInstanceSecurityGroupC53F1492", + "GroupId" + ] + }, + "ipProtocol": "tcp", + "sourceSecurityGroupId": { + "Fn::GetAtt": [ + "ElbSecurityGroupA4E93CA1", + "GroupId" + ] + }, + "toPort": 80 + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroupIngress", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" + } + }, + "InstanceRole": { + "id": "InstanceRole", + "path": "Stack/Asg/InstanceRole", + "children": { + "ImportInstanceRole": { + "id": "ImportInstanceRole", + "path": "Stack/Asg/InstanceRole/ImportInstanceRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "Stack/Asg/InstanceRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "ec2.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "tags": [ + { + "key": "Name", + "value": "Stack/Asg" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "Stack/Asg/InstanceRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "Stack/Asg/InstanceRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::aws-codedeploy-", + { + "Ref": "AWS::Region" + }, + "/latest/*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::aws-codedeploy-", + { + "Ref": "AWS::Region" + } + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "policyName": "AsgInstanceRoleDefaultPolicy16A5BCED", + "roles": [ + { + "Ref": "AsgInstanceRole7946982D" + } + ] + } + }, + "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.aws_iam.Role", + "version": "0.0.0" + } + }, + "InstanceProfile": { + "id": "InstanceProfile", + "path": "Stack/Asg/InstanceProfile", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::InstanceProfile", + "aws:cdk:cloudformation:props": { + "roles": [ + { + "Ref": "AsgInstanceRole7946982D" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnInstanceProfile", + "version": "0.0.0" + } + }, + "ImportedInstanceProfile": { + "id": "ImportedInstanceProfile", + "path": "Stack/Asg/ImportedInstanceProfile", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "LaunchTemplate": { + "id": "LaunchTemplate", + "path": "Stack/Asg/LaunchTemplate", + "children": { + "Resource": { + "id": "Resource", + "path": "Stack/Asg/LaunchTemplate/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::LaunchTemplate", + "aws:cdk:cloudformation:props": { + "launchTemplateData": { + "iamInstanceProfile": { + "arn": { + "Fn::GetAtt": [ + "AsgInstanceProfileBCEDB827", + "Arn" + ] + } + }, + "imageId": { + "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamznamihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter" + }, + "instanceType": "m5.large", + "monitoring": { + "enabled": false + }, + "securityGroupIds": [ + { + "Fn::GetAtt": [ + "AsgInstanceSecurityGroupC53F1492", + "GroupId" + ] + } + ], + "tagSpecifications": [ + { + "resourceType": "instance", + "tags": [ + { + "key": "Name", + "value": "Stack/Asg/LaunchTemplate" + } + ] + }, + { + "resourceType": "volume", + "tags": [ + { + "key": "Name", + "value": "Stack/Asg/LaunchTemplate" + } + ] + } + ], + "userData": { + "Fn::Base64": { + "Fn::Join": [ + "", + [ + "#!/bin/bash\nset +e\nPKG_CMD=`which yum 2>/dev/null`\nset -e\nif [ -z \"$PKG_CMD\" ]; then\nPKG_CMD=apt-get\nelse\nPKG_CMD=yum\nfi\n$PKG_CMD update -y\nset +e\n$PKG_CMD install -y ruby2.0\nRUBY2_INSTALL=$?\nset -e\nif [ $RUBY2_INSTALL -ne 0 ]; then\n$PKG_CMD install -y ruby\nfi\nAWS_CLI_PACKAGE_NAME=awscli\nif [ \"$PKG_CMD\" = \"yum\" ]; then\nAWS_CLI_PACKAGE_NAME=aws-cli\nfi\n$PKG_CMD install -y $AWS_CLI_PACKAGE_NAME\nTMP_DIR=`mktemp -d`\ncd $TMP_DIR\naws s3 cp s3://aws-codedeploy-", + { + "Ref": "AWS::Region" + }, + "/latest/install . --region ", + { + "Ref": "AWS::Region" + }, + "\nchmod +x ./install\n./install auto\nrm -fr $TMP_DIR" + ] + ] + } + } + }, + "tagSpecifications": [ + { + "resourceType": "launch-template", + "tags": [ + { + "key": "Name", + "value": "Stack/Asg/LaunchTemplate" + } + ] + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnLaunchTemplate", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.LaunchTemplate", + "version": "0.0.0" + } + }, + "ASG": { + "id": "ASG", + "path": "Stack/Asg/ASG", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AutoScaling::AutoScalingGroup", + "aws:cdk:cloudformation:props": { + "launchTemplate": { + "launchTemplateId": { + "Ref": "AsgLaunchTemplate6027899F" + }, + "version": { + "Fn::GetAtt": [ + "AsgLaunchTemplate6027899F", + "LatestVersionNumber" + ] + } + }, + "maxSize": "1", + "minSize": "1", + "tags": [ + { + "key": "Name", + "value": "Stack/Asg", + "propagateAtLaunch": true + } + ], + "targetGroupArns": [ + { + "Ref": "ElbListenerTargetGroup04811A33" + } + ], + "vpcZoneIdentifier": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", + "version": "0.0.0" + } + }, + "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { + "id": "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", + "path": "Stack/SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118": { + "id": "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118", + "path": "Stack/SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Elb": { + "id": "Elb", + "path": "Stack/Elb", + "children": { + "Resource": { + "id": "Resource", + "path": "Stack/Elb/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ElasticLoadBalancingV2::LoadBalancer", + "aws:cdk:cloudformation:props": { + "loadBalancerAttributes": [ + { + "key": "deletion_protection.enabled", + "value": "false" + } + ], + "scheme": "internal", + "securityGroups": [ + { + "Fn::GetAtt": [ + "ElbSecurityGroupA4E93CA1", + "GroupId" + ] + } + ], + "subnets": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + ], + "type": "application" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnLoadBalancer", + "version": "0.0.0" + } + }, + "SecurityGroup": { + "id": "SecurityGroup", + "path": "Stack/Elb/SecurityGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "Stack/Elb/SecurityGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", + "aws:cdk:cloudformation:props": { + "groupDescription": "Automatically created Security Group for ELB StackElbE5E7CBEA", + "securityGroupIngress": [ + { + "cidrIp": "0.0.0.0/0", + "ipProtocol": "tcp", + "fromPort": 80, + "toPort": 80, + "description": "Allow from anyone on port 80" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" + } + }, + "to StackAsgInstanceSecurityGroup57D71772:80": { + "id": "to StackAsgInstanceSecurityGroup57D71772:80", + "path": "Stack/Elb/SecurityGroup/to StackAsgInstanceSecurityGroup57D71772:80", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroupEgress", + "aws:cdk:cloudformation:props": { + "description": "Load balancer to target", + "destinationSecurityGroupId": { + "Fn::GetAtt": [ + "AsgInstanceSecurityGroupC53F1492", + "GroupId" + ] + }, + "fromPort": 80, + "groupId": { + "Fn::GetAtt": [ + "ElbSecurityGroupA4E93CA1", + "GroupId" + ] + }, + "ipProtocol": "tcp", + "toPort": 80 + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroupEgress", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" + } + }, + "Listener": { + "id": "Listener", + "path": "Stack/Elb/Listener", + "children": { + "Resource": { + "id": "Resource", + "path": "Stack/Elb/Listener/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ElasticLoadBalancingV2::Listener", + "aws:cdk:cloudformation:props": { + "defaultActions": [ + { + "type": "forward", + "targetGroupArn": { + "Ref": "ElbListenerTargetGroup04811A33" + } + } + ], + "loadBalancerArn": { + "Ref": "ElbA0932DBA" + }, + "port": 80, + "protocol": "HTTP" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnListener", + "version": "0.0.0" + } + }, + "TargetGroup": { + "id": "TargetGroup", + "path": "Stack/Elb/Listener/TargetGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "Stack/Elb/Listener/TargetGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ElasticLoadBalancingV2::TargetGroup", + "aws:cdk:cloudformation:props": { + "port": 80, + "protocol": "HTTP", + "targetGroupAttributes": [ + { + "key": "stickiness.enabled", + "value": "false" + } + ], + "targetType": "instance", + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnTargetGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationTargetGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListener", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer", + "version": "0.0.0" + } + }, + "DeploymentConfig": { + "id": "DeploymentConfig", + "path": "Stack/DeploymentConfig", + "children": { + "Resource": { + "id": "Resource", + "path": "Stack/DeploymentConfig/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CodeDeploy::DeploymentConfig", + "aws:cdk:cloudformation:props": { + "minimumHealthyHosts": { + "type": "HOST_COUNT", + "value": 1 + }, + "zonalConfig": { + "monitorDurationInSeconds": 20, + "firstZoneMonitorDurationInSeconds": 60, + "minimumHealthyHostsPerZone": { + "type": "HOST_COUNT", + "value": 1 + } + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_codedeploy.CfnDeploymentConfig", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_codedeploy.ServerDeploymentConfig", + "version": "0.0.0" + } + }, + "Alarm1": { + "id": "Alarm1", + "path": "Stack/Alarm1", + "children": { + "Resource": { + "id": "Resource", + "path": "Stack/Alarm1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm", + "aws:cdk:cloudformation:props": { + "comparisonOperator": "GreaterThanOrEqualToThreshold", + "evaluationPeriods": 1, + "metricName": "Errors", + "namespace": "my.namespace", + "period": 300, + "statistic": "Average", + "threshold": 1 + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", + "version": "0.0.0" + } + }, + "CodeDeployGroup": { + "id": "CodeDeployGroup", + "path": "Stack/CodeDeployGroup", + "children": { + "Role": { + "id": "Role", + "path": "Stack/CodeDeployGroup/Role", + "children": { + "ImportRole": { + "id": "ImportRole", + "path": "Stack/CodeDeployGroup/Role/ImportRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "Stack/CodeDeployGroup/Role/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "codedeploy.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "managedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSCodeDeployRole" + ] + ] + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "Application": { + "id": "Application", + "path": "Stack/CodeDeployGroup/Application", + "children": { + "Resource": { + "id": "Resource", + "path": "Stack/CodeDeployGroup/Application/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CodeDeploy::Application", + "aws:cdk:cloudformation:props": { + "computePlatform": "Server" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_codedeploy.CfnApplication", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_codedeploy.ServerApplication", + "version": "0.0.0" + } + }, + "Bucket": { + "id": "Bucket", + "path": "Stack/CodeDeployGroup/Bucket", + "constructInfo": { + "fqn": "aws-cdk-lib.aws_s3.BucketBase", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "Stack/CodeDeployGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CodeDeploy::DeploymentGroup", + "aws:cdk:cloudformation:props": { + "alarmConfiguration": { + "alarms": [ + { + "name": { + "Ref": "Alarm1F9009D71" + } + } + ], + "enabled": true + }, + "applicationName": { + "Ref": "CodeDeployGroupApplication13EFBDA6" + }, + "autoRollbackConfiguration": { + "enabled": false + }, + "autoScalingGroups": [ + { + "Ref": "AsgASGD1D7B4E2" + } + ], + "deploymentConfigName": { + "Ref": "DeploymentConfig4FADF16C" + }, + "deploymentStyle": { + "deploymentOption": "WITH_TRAFFIC_CONTROL" + }, + "loadBalancerInfo": { + "targetGroupInfoList": [ + { + "name": { + "Fn::GetAtt": [ + "ElbListenerTargetGroup04811A33", + "TargetGroupName" + ] + } + } + ] + }, + "serviceRoleArn": { + "Fn::GetAtt": [ + "CodeDeployGroupRole1D304F7A", + "Arn" + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_codedeploy.CfnDeploymentGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_codedeploy.ServerDeploymentGroup", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "Stack/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "Stack/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "ServerDeploymentGroupMultipleLB": { + "id": "ServerDeploymentGroupMultipleLB", + "path": "ServerDeploymentGroupMultipleLB", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "ServerDeploymentGroupMultipleLB/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "ServerDeploymentGroupMultipleLB/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "ServerDeploymentGroupMultipleLB/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "ServerDeploymentGroupMultipleLB/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "ServerDeploymentGroupMultipleLB/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.ts new file mode 100644 index 0000000000000..26078b26e978f --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.ts @@ -0,0 +1,62 @@ +import * as autoscaling from 'aws-cdk-lib/aws-autoscaling'; +import * as cloudwatch from 'aws-cdk-lib/aws-cloudwatch'; +import * as ec2 from 'aws-cdk-lib/aws-ec2'; +import * as elbv2 from 'aws-cdk-lib/aws-elasticloadbalancingv2'; +import * as cdk from 'aws-cdk-lib'; +import * as codedeploy from 'aws-cdk-lib/aws-codedeploy'; +import * as integ from '@aws-cdk/integ-tests-alpha'; + +const app = new cdk.App(); + +const stack = new cdk.Stack(app, 'Stack'); + +const vpc = new ec2.Vpc(stack, 'Vpc'); + +const asg = new autoscaling.AutoScalingGroup(stack, 'Asg', { + instanceType: ec2.InstanceType.of(ec2.InstanceClass.M5, ec2.InstanceSize.LARGE), + machineImage: new ec2.AmazonLinuxImage(), + vpc, +}); + +const elb = new elbv2.ApplicationLoadBalancer(stack, 'Elb', { vpc }); +const listener = elb.addListener('Listener', { + port: 80, + open: true, +}); +const targetGroup = listener.addTargets('Target', { + port: 80, + targets: [asg], +}); + +new codedeploy.ServerDeploymentGroup(stack, 'CodeDeployGroup', { + deploymentConfig: new codedeploy.ServerDeploymentConfig(stack, 'DeploymentConfig', { + minimumHealthyHosts: codedeploy.MinimumHealthyHosts.count(1), + zonalConfig: { + monitorDuration: cdk.Duration.seconds(20), + firstZoneMonitorDuration: cdk.Duration.minutes(1), + minimumHealthyHostsPerZone: codedeploy.MinimumHealthyHostsPerZone.count(1), + }, + }), + autoScalingGroups: [asg], + loadBalancers: [ + codedeploy.LoadBalancer.application(targetGroup), + ], + alarms: [ + new cloudwatch.Alarm(stack, 'Alarm1', { + metric: new cloudwatch.Metric({ + metricName: 'Errors', + namespace: 'my.namespace', + }), + threshold: 1, + evaluationPeriods: 1, + }), + ], + autoRollback: { + failedDeployment: false, + deploymentInAlarm: false, + }, +}); + +new integ.IntegTest(app, 'ServerDeploymentGroupMultipleLB', { + testCases: [stack], +}); From bd019191005cd5705162c063047b7b5f083eeccb Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Sun, 2 Jun 2024 23:11:49 +0900 Subject: [PATCH 03/23] docs: update readme --- packages/aws-cdk-lib/aws-codedeploy/README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/packages/aws-cdk-lib/aws-codedeploy/README.md b/packages/aws-cdk-lib/aws-codedeploy/README.md index 752efc73ad526..4e07b47de5208 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/README.md +++ b/packages/aws-cdk-lib/aws-codedeploy/README.md @@ -211,6 +211,25 @@ const deploymentConfig = codedeploy.ServerDeploymentConfig.fromServerDeploymentC ); ``` +### Zonal Configuration + +CodeDeploy can deploy your application to one Availability Zone at a time, within an AWS Region by configuring [zonal configuration](https://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-configurations-create.html#zonal-config). + +To create a new zonal configuration: + +```ts +const deploymentConfig = new codedeploy.ServerDeploymentConfig(this, 'DeploymentConfiguration', { + minimumHealthyHosts: codedeploy.MinimumHealthyHosts.count(2), + zonalConfig: { + monitorDuration: cdk.Duration.minutes(20), + firstZoneMonitorDuration: cdk.Duration.minutes(60), + minimumHealthyHostsPerZone: codedeploy.MinimumHealthyHostsPerZone.count(1), + }, +}); +``` + +**Note**: Zonal configuration is only configurable for EC2/on-premise deployments. + ## Lambda Applications To create a new CodeDeploy Application that deploys to a Lambda function: From 8612da2306026db300bd0dad2a5c5c45b556a549 Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Sun, 2 Jun 2024 23:21:27 +0900 Subject: [PATCH 04/23] refactoring --- .../aws-codedeploy/lib/server/deployment-config.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/aws-cdk-lib/aws-codedeploy/lib/server/deployment-config.ts b/packages/aws-cdk-lib/aws-codedeploy/lib/server/deployment-config.ts index 7845cdba9cbf5..95fd694f324b9 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/lib/server/deployment-config.ts +++ b/packages/aws-cdk-lib/aws-codedeploy/lib/server/deployment-config.ts @@ -76,9 +76,6 @@ export class ServerDeploymentConfig extends BaseDeploymentConfig implements ISer } constructor(scope: Construct, id: string, props: ServerDeploymentConfigProps) { - super(scope, id, { - ...props, - zonalConfig: props.zonalConfig, - }); + super(scope, id, props); } } From 04513711b3f0e2d50b336e52c2f277f32c172ead Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Sun, 2 Jun 2024 23:22:55 +0900 Subject: [PATCH 05/23] feat: check computePlatform --- .../aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts b/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts index 29ef303620d03..4d817d88a11dc 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts +++ b/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts @@ -174,6 +174,10 @@ export abstract class BaseDeploymentConfig extends Resource implements IBaseDepl throw new Error('Minimum healthy hosts config must only be specified for a Server-base deployment configuration'); } + if (props?.zonalConfig && props?.computePlatform && props?.computePlatform !== ComputePlatform.SERVER) { + throw new Error('Zonal config must only be specified for a EC2/on-premise deployment configuration'); + } + const resource = new CfnDeploymentConfig(this, 'Resource', { deploymentConfigName: this.physicalName, computePlatform: props?.computePlatform, From 0034d02eefe5d2245f9728ec765b47dadbc463f7 Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Sun, 2 Jun 2024 23:24:03 +0900 Subject: [PATCH 06/23] chore: update sentence --- .../aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts b/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts index 4d817d88a11dc..fc27c93a5b56c 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts +++ b/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts @@ -175,7 +175,7 @@ export abstract class BaseDeploymentConfig extends Resource implements IBaseDepl } if (props?.zonalConfig && props?.computePlatform && props?.computePlatform !== ComputePlatform.SERVER) { - throw new Error('Zonal config must only be specified for a EC2/on-premise deployment configuration'); + throw new Error('Zonal config must only be specified for a Server-base deployment configuration'); } const resource = new CfnDeploymentConfig(this, 'Resource', { From 99c93007d457483cd21f8e46f7c6e5773e8904d3 Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Mon, 3 Jun 2024 00:38:30 +0900 Subject: [PATCH 07/23] fix: readme --- packages/aws-cdk-lib/aws-codedeploy/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/aws-cdk-lib/aws-codedeploy/README.md b/packages/aws-cdk-lib/aws-codedeploy/README.md index 4e07b47de5208..99f611bf4f9eb 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/README.md +++ b/packages/aws-cdk-lib/aws-codedeploy/README.md @@ -218,11 +218,13 @@ CodeDeploy can deploy your application to one Availability Zone at a time, withi To create a new zonal configuration: ```ts +import { Duration } from 'aws-cdk-lib'; + const deploymentConfig = new codedeploy.ServerDeploymentConfig(this, 'DeploymentConfiguration', { minimumHealthyHosts: codedeploy.MinimumHealthyHosts.count(2), zonalConfig: { - monitorDuration: cdk.Duration.minutes(20), - firstZoneMonitorDuration: cdk.Duration.minutes(60), + monitorDuration: Duration.minutes(20), + firstZoneMonitorDuration: Duration.minutes(60), minimumHealthyHostsPerZone: codedeploy.MinimumHealthyHostsPerZone.count(1), }, }); From bae2d361e681d4cb2d28a440ecc149f2540c0e5f Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Mon, 3 Jun 2024 20:49:14 +0900 Subject: [PATCH 08/23] fix: readme --- packages/aws-cdk-lib/aws-codedeploy/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/aws-cdk-lib/aws-codedeploy/README.md b/packages/aws-cdk-lib/aws-codedeploy/README.md index 99f611bf4f9eb..1227723462465 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/README.md +++ b/packages/aws-cdk-lib/aws-codedeploy/README.md @@ -218,8 +218,6 @@ CodeDeploy can deploy your application to one Availability Zone at a time, withi To create a new zonal configuration: ```ts -import { Duration } from 'aws-cdk-lib'; - const deploymentConfig = new codedeploy.ServerDeploymentConfig(this, 'DeploymentConfiguration', { minimumHealthyHosts: codedeploy.MinimumHealthyHosts.count(2), zonalConfig: { From 20a2af3425e08b686ffeeb7bcdd426cca4a06f3b Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Mon, 3 Jun 2024 23:18:32 +0900 Subject: [PATCH 09/23] docs: update readme --- packages/aws-cdk-lib/aws-codedeploy/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-codedeploy/README.md b/packages/aws-cdk-lib/aws-codedeploy/README.md index 1227723462465..4b291af295005 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/README.md +++ b/packages/aws-cdk-lib/aws-codedeploy/README.md @@ -215,7 +215,7 @@ const deploymentConfig = codedeploy.ServerDeploymentConfig.fromServerDeploymentC CodeDeploy can deploy your application to one Availability Zone at a time, within an AWS Region by configuring [zonal configuration](https://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-configurations-create.html#zonal-config). -To create a new zonal configuration: +To create a new deployment configuration with zonal configuration: ```ts const deploymentConfig = new codedeploy.ServerDeploymentConfig(this, 'DeploymentConfiguration', { From 0753578ca353240d30bccb2cdc3bba88bbc4e08e Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Tue, 4 Jun 2024 00:27:23 +0900 Subject: [PATCH 10/23] test: add unit test --- .../lib/base-deployment-config.ts | 4 -- .../test/server/deployment-config.test.ts | 43 +++++++++++++++++++ 2 files changed, 43 insertions(+), 4 deletions(-) diff --git a/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts b/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts index fc27c93a5b56c..29ef303620d03 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts +++ b/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts @@ -174,10 +174,6 @@ export abstract class BaseDeploymentConfig extends Resource implements IBaseDepl throw new Error('Minimum healthy hosts config must only be specified for a Server-base deployment configuration'); } - if (props?.zonalConfig && props?.computePlatform && props?.computePlatform !== ComputePlatform.SERVER) { - throw new Error('Zonal config must only be specified for a Server-base deployment configuration'); - } - const resource = new CfnDeploymentConfig(this, 'Resource', { deploymentConfigName: this.physicalName, computePlatform: props?.computePlatform, diff --git a/packages/aws-cdk-lib/aws-codedeploy/test/server/deployment-config.test.ts b/packages/aws-cdk-lib/aws-codedeploy/test/server/deployment-config.test.ts index 8e7d42a25e1cf..254f175689cdf 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/test/server/deployment-config.test.ts +++ b/packages/aws-cdk-lib/aws-codedeploy/test/server/deployment-config.test.ts @@ -64,4 +64,47 @@ describe('CodeDeploy DeploymentConfig', () => { expect(() => app.synth()).toThrow('Deployment config name: "my name" can only contain letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), + (plus signs), = (equals signs), , (commas), @ (at signs), - (minus signs).'); }); + + describe('zonal configuration', () => { + test('default value', () => { + const app = new cdk.App(); + const stack = new cdk.Stack(app); + new codedeploy.ServerDeploymentConfig(stack, 'DeploymentConfig', { + minimumHealthyHosts: codedeploy.MinimumHealthyHosts.count(1), + zonalConfig: {}, + }); + + Template.fromStack(stack).hasResourceProperties( + 'AWS::CodeDeploy::DeploymentConfig', { + 'ZonalConfig': {}, + }, + ); + }); + + test('configure optional properties', () => { + const app = new cdk.App(); + const stack = new cdk.Stack(app); + new codedeploy.ServerDeploymentConfig(stack, 'DeploymentConfig', { + minimumHealthyHosts: codedeploy.MinimumHealthyHosts.count(1), + zonalConfig: { + monitorDuration: cdk.Duration.minutes(10), + firstZoneMonitorDuration: cdk.Duration.hours(1), + minimumHealthyHostsPerZone: codedeploy.MinimumHealthyHostsPerZone.count(2), + }, + }); + + Template.fromStack(stack).hasResourceProperties( + 'AWS::CodeDeploy::DeploymentConfig', { + 'ZonalConfig': { + MonitorDurationInSeconds: 600, + FirstZoneMonitorDurationInSeconds: 3600, + MinimumHealthyHostsPerZone: { + Type: 'HOST_COUNT', + Value: 2, + }, + }, + }, + ); + }); + }); }); From 5cc39757e94bbe7db9315d733ea89af7af986539 Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Fri, 7 Jun 2024 21:10:35 +0900 Subject: [PATCH 11/23] chore: fix typo --- .../aws-cdk-lib/aws-codedeploy/lib/host-health-config.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/aws-cdk-lib/aws-codedeploy/lib/host-health-config.ts b/packages/aws-cdk-lib/aws-codedeploy/lib/host-health-config.ts index 334b7ad28531d..60b2b96c6bce2 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/lib/host-health-config.ts +++ b/packages/aws-cdk-lib/aws-codedeploy/lib/host-health-config.ts @@ -6,7 +6,7 @@ import { CfnDeploymentConfig } from './codedeploy.generated'; export class MinimumHealthyHosts { /** - * The minimum healhty hosts threshold expressed as an absolute number. + * The minimum healthy hosts threshold expressed as an absolute number. */ public static count(value: number): MinimumHealthyHosts { return new MinimumHealthyHosts({ @@ -16,7 +16,7 @@ export class MinimumHealthyHosts { } /** - * The minmum healhty hosts threshold expressed as a percentage of the fleet. + * The minimum healthy hosts threshold expressed as a percentage of the fleet. */ public static percentage(value: number): MinimumHealthyHosts { return new MinimumHealthyHosts({ @@ -41,7 +41,7 @@ export class MinimumHealthyHosts { export class MinimumHealthyHostsPerZone { /** - * The minimum healhty hosts threshold expressed as an absolute number. + * The minimum healthy hosts threshold expressed as an absolute number. */ public static count(value: number): MinimumHealthyHostsPerZone { return new MinimumHealthyHostsPerZone({ @@ -51,7 +51,7 @@ export class MinimumHealthyHostsPerZone { } /** - * The minmum healhty hosts threshold expressed as a percentage of the fleet. + * The minimum healthy hosts threshold expressed as a percentage of the fleet. */ public static percentage(value: number): MinimumHealthyHostsPerZone { return new MinimumHealthyHostsPerZone({ From b246b43d961afa03ebce6ceef5848b88eff4f641 Mon Sep 17 00:00:00 2001 From: kazuho cryer-shinozuka Date: Fri, 7 Jun 2024 21:11:13 +0900 Subject: [PATCH 12/23] Update packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts Co-authored-by: Luca Pizzini --- .../aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts b/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts index 29ef303620d03..9f505f9dbd6aa 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts +++ b/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts @@ -68,6 +68,8 @@ export interface ZonalConfig { /** * The period of time that CodeDeploy must wait after completing a deployment to the first Availability Zone. * + * Minimum value is 1 second or 0. + * * @default - the same value as `monitorDuration` */ readonly firstZoneMonitorDuration?: Duration; From bef182e184fcdca501de777836ff52a1222c002e Mon Sep 17 00:00:00 2001 From: kazuho cryer-shinozuka Date: Fri, 7 Jun 2024 21:11:22 +0900 Subject: [PATCH 13/23] Update packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts Co-authored-by: Luca Pizzini --- .../aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts b/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts index 9f505f9dbd6aa..48cfaaf50887d 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts +++ b/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts @@ -61,6 +61,8 @@ export interface ZonalConfig { /** * The period of time that CodeDeploy must wait after completing a deployment to an Availability Zone. * + * Minimum value is 1 second or 0. + * * @default - CodeDeploy starts deploying to the next Availability Zone immediately */ readonly monitorDuration?: Duration; From d0aaaf06b8906f61975ed13444fc353e9f8b732b Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Fri, 7 Jun 2024 21:27:42 +0900 Subject: [PATCH 14/23] feat: add validation --- .../lib/base-deployment-config.ts | 18 ++++++++++++- .../test/server/deployment-config.test.ts | 26 +++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts b/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts index 48cfaaf50887d..0742cb948fa05 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts +++ b/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts @@ -3,7 +3,7 @@ import { CfnDeploymentConfig } from './codedeploy.generated'; import { MinimumHealthyHosts, MinimumHealthyHostsPerZone } from './host-health-config'; import { arnForDeploymentConfig, validateName } from './private/utils'; import { TrafficRouting } from './traffic-routing-config'; -import { ArnFormat, Duration, Resource, Stack } from '../../core'; +import { ArnFormat, Duration, Resource, Stack, Token } from '../../core'; /** * The base class for ServerDeploymentConfig, EcsDeploymentConfig, @@ -178,6 +178,15 @@ export abstract class BaseDeploymentConfig extends Resource implements IBaseDepl throw new Error('Minimum healthy hosts config must only be specified for a Server-base deployment configuration'); } + if (props?.zonalConfig) { + if (props.zonalConfig.monitorDuration) { + this.validateDurationLessThanOneSecond(props.zonalConfig.monitorDuration, 'monitorDuration'); + } + if (props.zonalConfig.firstZoneMonitorDuration) { + this.validateDurationLessThanOneSecond(props.zonalConfig.firstZoneMonitorDuration, 'firstZoneMonitorDuration'); + } + } + const resource = new CfnDeploymentConfig(this, 'Resource', { deploymentConfigName: this.physicalName, computePlatform: props?.computePlatform, @@ -200,6 +209,13 @@ export abstract class BaseDeploymentConfig extends Resource implements IBaseDepl this.node.addValidation({ validate: () => validateName('Deployment config', this.physicalName) }); } + + private validateDurationLessThanOneSecond(duration: Duration, name: string) { + const milliseconds = duration.toMilliseconds(); + if (milliseconds > 0 && milliseconds < 1000) { + throw new Error(`${name} must be greater than or equal to 1 second or 0, got ${milliseconds}ms`); + } + } } function ignore(_x: any) { return; } diff --git a/packages/aws-cdk-lib/aws-codedeploy/test/server/deployment-config.test.ts b/packages/aws-cdk-lib/aws-codedeploy/test/server/deployment-config.test.ts index 254f175689cdf..190b683aa96aa 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/test/server/deployment-config.test.ts +++ b/packages/aws-cdk-lib/aws-codedeploy/test/server/deployment-config.test.ts @@ -106,5 +106,31 @@ describe('CodeDeploy DeploymentConfig', () => { }, ); }); + + test('throw error for invalid monitorDuration', () => { + const app = new cdk.App(); + const stack = new cdk.Stack(app); + expect(() => { + new codedeploy.ServerDeploymentConfig(stack, 'DeploymentConfig', { + minimumHealthyHosts: codedeploy.MinimumHealthyHosts.count(1), + zonalConfig: { + monitorDuration: cdk.Duration.millis(500), + }, + }); + }).toThrow('monitorDuration must be greater than or equal to 1 second or 0, got 500ms'); + }); + + test('throw error for invalid firstZoneMonitorDuration', () => { + const app = new cdk.App(); + const stack = new cdk.Stack(app); + expect(() => { + new codedeploy.ServerDeploymentConfig(stack, 'DeploymentConfig', { + minimumHealthyHosts: codedeploy.MinimumHealthyHosts.count(1), + zonalConfig: { + firstZoneMonitorDuration: cdk.Duration.millis(500), + }, + }); + }).toThrow('firstZoneMonitorDuration must be greater than or equal to 1 second or 0, got 500ms'); + }); }); }); From d7b4c1f3b52b4841c2d52040e5995d4e9929db8e Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Fri, 7 Jun 2024 21:47:44 +0900 Subject: [PATCH 15/23] test: update integ test --- ...faultTestDeployAssertEA00EA72.assets.json} | 2 +- ...ultTestDeployAssertEA00EA72.template.json} | 0 .../Stack.assets.json | 4 ++-- .../Stack.template.json | 4 ++-- .../integ.json | 6 +++--- .../manifest.json | 20 +++++++++---------- .../tree.json | 20 +++++++++---------- .../integ.deployment-group-zonal-config.ts | 6 +++--- 8 files changed, 31 insertions(+), 31 deletions(-) rename packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/{ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C.assets.json => ServerDeploymentGroupZonalConfigDefaultTestDeployAssertEA00EA72.assets.json} (86%) rename packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/{ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C.template.json => ServerDeploymentGroupZonalConfigDefaultTestDeployAssertEA00EA72.template.json} (100%) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/ServerDeploymentGroupZonalConfigDefaultTestDeployAssertEA00EA72.assets.json similarity index 86% rename from packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C.assets.json rename to packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/ServerDeploymentGroupZonalConfigDefaultTestDeployAssertEA00EA72.assets.json index 685f9193ba498..2a2bd33e87f1f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/ServerDeploymentGroupZonalConfigDefaultTestDeployAssertEA00EA72.assets.json @@ -3,7 +3,7 @@ "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { - "path": "ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C.template.json", + "path": "ServerDeploymentGroupZonalConfigDefaultTestDeployAssertEA00EA72.template.json", "packaging": "file" }, "destinations": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/ServerDeploymentGroupZonalConfigDefaultTestDeployAssertEA00EA72.template.json similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C.template.json rename to packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/ServerDeploymentGroupZonalConfigDefaultTestDeployAssertEA00EA72.template.json diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/Stack.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/Stack.assets.json index 5af58c7c647d7..736204a6e8d50 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/Stack.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/Stack.assets.json @@ -14,7 +14,7 @@ } } }, - "c42862b3f17a28cbbcd8ff7ee7bd4b095381dd1f511fc27ce9fcda265260432e": { + "fd112716aa52a9166f052dd389ae9236f72ff647e9cb485dcac55c28260e3538": { "source": { "path": "Stack.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "c42862b3f17a28cbbcd8ff7ee7bd4b095381dd1f511fc27ce9fcda265260432e.json", + "objectKey": "fd112716aa52a9166f052dd389ae9236f72ff647e9cb485dcac55c28260e3538.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/server/integ.deployment-group-zonal-config.js.snapshot/Stack.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/Stack.template.json index a0fd0659157b9..a92c78ef622ba 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/Stack.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/Stack.template.json @@ -877,12 +877,12 @@ "Value": 1 }, "ZonalConfig": { - "FirstZoneMonitorDurationInSeconds": 60, + "FirstZoneMonitorDurationInSeconds": 0, "MinimumHealthyHostsPerZone": { "Type": "HOST_COUNT", "Value": 1 }, - "MonitorDurationInSeconds": 20 + "MonitorDurationInSeconds": 0 } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/integ.json index 2026a80ef1871..c54df4175eb76 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/integ.json @@ -1,12 +1,12 @@ { "version": "36.0.0", "testCases": { - "ServerDeploymentGroupMultipleLB/DefaultTest": { + "ServerDeploymentGroupZonalConfig/DefaultTest": { "stacks": [ "Stack" ], - "assertionStack": "ServerDeploymentGroupMultipleLB/DefaultTest/DeployAssert", - "assertionStackName": "ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C" + "assertionStack": "ServerDeploymentGroupZonalConfig/DefaultTest/DeployAssert", + "assertionStackName": "ServerDeploymentGroupZonalConfigDefaultTestDeployAssertEA00EA72" } } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/manifest.json index 230d42fcdb689..574e8516e5195 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/manifest.json @@ -18,7 +18,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}/c42862b3f17a28cbbcd8ff7ee7bd4b095381dd1f511fc27ce9fcda265260432e.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fd112716aa52a9166f052dd389ae9236f72ff647e9cb485dcac55c28260e3538.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -313,19 +313,19 @@ }, "displayName": "Stack" }, - "ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C.assets": { + "ServerDeploymentGroupZonalConfigDefaultTestDeployAssertEA00EA72.assets": { "type": "cdk:asset-manifest", "properties": { - "file": "ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C.assets.json", + "file": "ServerDeploymentGroupZonalConfigDefaultTestDeployAssertEA00EA72.assets.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" } }, - "ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C": { + "ServerDeploymentGroupZonalConfigDefaultTestDeployAssertEA00EA72": { "type": "aws:cloudformation:stack", "environment": "aws://unknown-account/unknown-region", "properties": { - "templateFile": "ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C.template.json", + "templateFile": "ServerDeploymentGroupZonalConfigDefaultTestDeployAssertEA00EA72.template.json", "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", @@ -334,7 +334,7 @@ "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ - "ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C.assets" + "ServerDeploymentGroupZonalConfigDefaultTestDeployAssertEA00EA72.assets" ], "lookupRole": { "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", @@ -343,23 +343,23 @@ } }, "dependencies": [ - "ServerDeploymentGroupMultipleLBDefaultTestDeployAssertC00E0E7C.assets" + "ServerDeploymentGroupZonalConfigDefaultTestDeployAssertEA00EA72.assets" ], "metadata": { - "/ServerDeploymentGroupMultipleLB/DefaultTest/DeployAssert/BootstrapVersion": [ + "/ServerDeploymentGroupZonalConfig/DefaultTest/DeployAssert/BootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "BootstrapVersion" } ], - "/ServerDeploymentGroupMultipleLB/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + "/ServerDeploymentGroupZonalConfig/DefaultTest/DeployAssert/CheckBootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } ] }, - "displayName": "ServerDeploymentGroupMultipleLB/DefaultTest/DeployAssert" + "displayName": "ServerDeploymentGroupZonalConfig/DefaultTest/DeployAssert" }, "Tree": { "type": "cdk:tree", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/tree.json index c9bb2c8452893..fa09d64725bac 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/tree.json @@ -1289,8 +1289,8 @@ "value": 1 }, "zonalConfig": { - "monitorDurationInSeconds": 20, - "firstZoneMonitorDurationInSeconds": 60, + "monitorDurationInSeconds": 0, + "firstZoneMonitorDurationInSeconds": 0, "minimumHealthyHostsPerZone": { "type": "HOST_COUNT", "value": 1 @@ -1518,17 +1518,17 @@ "version": "0.0.0" } }, - "ServerDeploymentGroupMultipleLB": { - "id": "ServerDeploymentGroupMultipleLB", - "path": "ServerDeploymentGroupMultipleLB", + "ServerDeploymentGroupZonalConfig": { + "id": "ServerDeploymentGroupZonalConfig", + "path": "ServerDeploymentGroupZonalConfig", "children": { "DefaultTest": { "id": "DefaultTest", - "path": "ServerDeploymentGroupMultipleLB/DefaultTest", + "path": "ServerDeploymentGroupZonalConfig/DefaultTest", "children": { "Default": { "id": "Default", - "path": "ServerDeploymentGroupMultipleLB/DefaultTest/Default", + "path": "ServerDeploymentGroupZonalConfig/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", "version": "10.3.0" @@ -1536,11 +1536,11 @@ }, "DeployAssert": { "id": "DeployAssert", - "path": "ServerDeploymentGroupMultipleLB/DefaultTest/DeployAssert", + "path": "ServerDeploymentGroupZonalConfig/DefaultTest/DeployAssert", "children": { "BootstrapVersion": { "id": "BootstrapVersion", - "path": "ServerDeploymentGroupMultipleLB/DefaultTest/DeployAssert/BootstrapVersion", + "path": "ServerDeploymentGroupZonalConfig/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", "version": "0.0.0" @@ -1548,7 +1548,7 @@ }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", - "path": "ServerDeploymentGroupMultipleLB/DefaultTest/DeployAssert/CheckBootstrapVersion", + "path": "ServerDeploymentGroupZonalConfig/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", "version": "0.0.0" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.ts index 26078b26e978f..22a08ba25d07c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.ts @@ -32,8 +32,8 @@ new codedeploy.ServerDeploymentGroup(stack, 'CodeDeployGroup', { deploymentConfig: new codedeploy.ServerDeploymentConfig(stack, 'DeploymentConfig', { minimumHealthyHosts: codedeploy.MinimumHealthyHosts.count(1), zonalConfig: { - monitorDuration: cdk.Duration.seconds(20), - firstZoneMonitorDuration: cdk.Duration.minutes(1), + monitorDuration: cdk.Duration.seconds(0), + firstZoneMonitorDuration: cdk.Duration.minutes(0), minimumHealthyHostsPerZone: codedeploy.MinimumHealthyHostsPerZone.count(1), }, }), @@ -57,6 +57,6 @@ new codedeploy.ServerDeploymentGroup(stack, 'CodeDeployGroup', { }, }); -new integ.IntegTest(app, 'ServerDeploymentGroupMultipleLB', { +new integ.IntegTest(app, 'ServerDeploymentGroupZonalConfig', { testCases: [stack], }); From 86d2a998ab90535205e726db3158075538b1cb1a Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Fri, 7 Jun 2024 21:56:28 +0900 Subject: [PATCH 16/23] fix: unused import --- .../aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts b/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts index 0742cb948fa05..d47071c9db6a0 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts +++ b/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts @@ -3,7 +3,7 @@ import { CfnDeploymentConfig } from './codedeploy.generated'; import { MinimumHealthyHosts, MinimumHealthyHostsPerZone } from './host-health-config'; import { arnForDeploymentConfig, validateName } from './private/utils'; import { TrafficRouting } from './traffic-routing-config'; -import { ArnFormat, Duration, Resource, Stack, Token } from '../../core'; +import { ArnFormat, Duration, Resource, Stack } from '../../core'; /** * The base class for ServerDeploymentConfig, EcsDeploymentConfig, From 8b19eb527776d832a039961c4642ec083438cb1b Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Mon, 24 Jun 2024 12:42:49 +0900 Subject: [PATCH 17/23] update integ --- .../Stack.assets.json | 4 +- .../Stack.template.json | 119 ++++++- .../manifest.json | 8 +- .../tree.json | 336 +++++++++--------- 4 files changed, 299 insertions(+), 168 deletions(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/Stack.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/Stack.assets.json index 736204a6e8d50..eba8a87ec3315 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/Stack.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/Stack.assets.json @@ -14,7 +14,7 @@ } } }, - "fd112716aa52a9166f052dd389ae9236f72ff647e9cb485dcac55c28260e3538": { + "a0a65e4425ece3597cd26d96beef0fe9f9ca1ccfcfbda00b998268ddf860dffd": { "source": { "path": "Stack.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "fd112716aa52a9166f052dd389ae9236f72ff647e9cb485dcac55c28260e3538.json", + "objectKey": "a0a65e4425ece3597cd26d96beef0fe9f9ca1ccfcfbda00b998268ddf860dffd.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/server/integ.deployment-group-zonal-config.js.snapshot/Stack.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/Stack.template.json index a92c78ef622ba..2526892e2c7a5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/Stack.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/Stack.template.json @@ -500,7 +500,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -986,6 +994,115 @@ } } }, + "Mappings": { + "LatestNodeRuntimeMap": { + "af-south-1": { + "value": "nodejs20.x" + }, + "ap-east-1": { + "value": "nodejs20.x" + }, + "ap-northeast-1": { + "value": "nodejs20.x" + }, + "ap-northeast-2": { + "value": "nodejs20.x" + }, + "ap-northeast-3": { + "value": "nodejs20.x" + }, + "ap-south-1": { + "value": "nodejs20.x" + }, + "ap-south-2": { + "value": "nodejs20.x" + }, + "ap-southeast-1": { + "value": "nodejs20.x" + }, + "ap-southeast-2": { + "value": "nodejs20.x" + }, + "ap-southeast-3": { + "value": "nodejs20.x" + }, + "ap-southeast-4": { + "value": "nodejs20.x" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.x" + }, + "eu-north-1": { + "value": "nodejs20.x" + }, + "eu-south-1": { + "value": "nodejs20.x" + }, + "eu-south-2": { + "value": "nodejs20.x" + }, + "eu-west-1": { + "value": "nodejs20.x" + }, + "eu-west-2": { + "value": "nodejs20.x" + }, + "eu-west-3": { + "value": "nodejs20.x" + }, + "il-central-1": { + "value": "nodejs20.x" + }, + "me-central-1": { + "value": "nodejs20.x" + }, + "me-south-1": { + "value": "nodejs20.x" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.x" + }, + "us-iso-east-1": { + "value": "nodejs18.x" + }, + "us-iso-west-1": { + "value": "nodejs18.x" + }, + "us-isob-east-1": { + "value": "nodejs18.x" + }, + "us-west-1": { + "value": "nodejs20.x" + }, + "us-west-2": { + "value": "nodejs20.x" + } + } + }, "Parameters": { "SsmParameterValueawsserviceamiamazonlinuxlatestamznamihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter": { "Type": "AWS::SSM::Parameter::Value", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/manifest.json index 574e8516e5195..b92d1cf10ec3a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/manifest.json @@ -18,7 +18,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}/fd112716aa52a9166f052dd389ae9236f72ff647e9cb485dcac55c28260e3538.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a0a65e4425ece3597cd26d96beef0fe9f9ca1ccfcfbda00b998268ddf860dffd.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -178,6 +178,12 @@ "data": "VpcRestrictDefaultSecurityGroupCustomResourceC73DA2BE" } ], + "/Stack/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/Stack/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/tree.json index fa09d64725bac..87ef7b7ed578c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/tree.json @@ -31,8 +31,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "PublicSubnet1": { @@ -75,16 +75,16 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Acl": { "id": "Acl", "path": "Stack/Vpc/PublicSubnet1/Acl", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "RouteTable": { @@ -105,8 +105,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "RouteTableAssociation": { @@ -124,8 +124,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultRoute": { @@ -144,8 +144,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "EIP": { @@ -164,8 +164,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "NATGateway": { @@ -192,14 +192,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "PublicSubnet2": { @@ -242,16 +242,16 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Acl": { "id": "Acl", "path": "Stack/Vpc/PublicSubnet2/Acl", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "RouteTable": { @@ -272,8 +272,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "RouteTableAssociation": { @@ -291,8 +291,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultRoute": { @@ -311,8 +311,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "EIP": { @@ -331,8 +331,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "NATGateway": { @@ -359,14 +359,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "PrivateSubnet1": { @@ -409,16 +409,16 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Acl": { "id": "Acl", "path": "Stack/Vpc/PrivateSubnet1/Acl", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "RouteTable": { @@ -439,8 +439,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "RouteTableAssociation": { @@ -458,8 +458,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultRoute": { @@ -478,14 +478,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "PrivateSubnet2": { @@ -528,16 +528,16 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Acl": { "id": "Acl", "path": "Stack/Vpc/PrivateSubnet2/Acl", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "RouteTable": { @@ -558,8 +558,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "RouteTableAssociation": { @@ -577,8 +577,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultRoute": { @@ -597,14 +597,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "IGW": { @@ -622,8 +622,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "VPCGW": { @@ -641,8 +641,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -653,20 +653,28 @@ "id": "Default", "path": "Stack/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "Stack/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -677,30 +685,30 @@ "id": "Staging", "path": "Stack/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { - "fqn": "aws-cdk-lib.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Role": { "id": "Role", "path": "Stack/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Handler": { "id": "Handler", "path": "Stack/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Asg": { @@ -737,8 +745,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "from StackElbSecurityGroup01E7E34F:80": { @@ -766,14 +774,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroupIngress", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "InstanceRole": { @@ -784,8 +792,8 @@ "id": "ImportInstanceRole", "path": "Stack/Asg/InstanceRole/ImportInstanceRole", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Resource": { @@ -815,8 +823,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultPolicy": { @@ -884,20 +892,20 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "InstanceProfile": { @@ -914,16 +922,16 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnInstanceProfile", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "ImportedInstanceProfile": { "id": "ImportedInstanceProfile", "path": "Stack/Asg/ImportedInstanceProfile", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "LaunchTemplate": { @@ -1013,14 +1021,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnLaunchTemplate", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.LaunchTemplate", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "ASG": { @@ -1065,30 +1073,30 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { "id": "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "path": "Stack/SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118": { "id": "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118", "path": "Stack/SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Elb": { @@ -1128,8 +1136,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnLoadBalancer", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "SecurityGroup": { @@ -1158,8 +1166,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "to StackAsgInstanceSecurityGroup57D71772:80": { @@ -1187,14 +1195,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroupEgress", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Listener": { @@ -1223,8 +1231,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnListener", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "TargetGroup": { @@ -1252,26 +1260,26 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnTargetGroup", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationTargetGroup", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListener", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DeploymentConfig": { @@ -1299,14 +1307,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_codedeploy.CfnDeploymentConfig", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_codedeploy.ServerDeploymentConfig", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Alarm1": { @@ -1329,14 +1337,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "CodeDeployGroup": { @@ -1351,8 +1359,8 @@ "id": "ImportRole", "path": "Stack/CodeDeployGroup/Role/ImportRole", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Resource": { @@ -1390,14 +1398,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Application": { @@ -1414,22 +1422,22 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_codedeploy.CfnApplication", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_codedeploy.ServerApplication", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Bucket": { "id": "Bucket", "path": "Stack/CodeDeployGroup/Bucket", "constructInfo": { - "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Resource": { @@ -1486,36 +1494,36 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_codedeploy.CfnDeploymentGroup", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_codedeploy.ServerDeploymentGroup", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "Stack/BootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "Stack/CheckBootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnRule", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "ServerDeploymentGroupZonalConfig": { @@ -1542,22 +1550,22 @@ "id": "BootstrapVersion", "path": "ServerDeploymentGroupZonalConfig/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "ServerDeploymentGroupZonalConfig/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnRule", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, @@ -1582,8 +1590,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.App", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } } \ No newline at end of file From c0e3d36ea8dfbdf347976487e698be202627fc00 Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Mon, 24 Jun 2024 12:54:41 +0900 Subject: [PATCH 18/23] nit --- packages/aws-cdk-lib/aws-codedeploy/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-codedeploy/README.md b/packages/aws-cdk-lib/aws-codedeploy/README.md index 4b291af295005..99f6dfffc23f5 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/README.md +++ b/packages/aws-cdk-lib/aws-codedeploy/README.md @@ -221,7 +221,7 @@ To create a new deployment configuration with zonal configuration: const deploymentConfig = new codedeploy.ServerDeploymentConfig(this, 'DeploymentConfiguration', { minimumHealthyHosts: codedeploy.MinimumHealthyHosts.count(2), zonalConfig: { - monitorDuration: Duration.minutes(20), + monitorDuration: Duration.minutes(30), firstZoneMonitorDuration: Duration.minutes(60), minimumHealthyHostsPerZone: codedeploy.MinimumHealthyHostsPerZone.count(1), }, From 64196ea2d314ea3886e912e2b461352652b7c7e7 Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Sun, 30 Jun 2024 00:55:23 +0900 Subject: [PATCH 19/23] update funcname --- .../aws-codedeploy/lib/base-deployment-config.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts b/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts index d47071c9db6a0..212eb119a8ed3 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts +++ b/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts @@ -180,10 +180,10 @@ export abstract class BaseDeploymentConfig extends Resource implements IBaseDepl if (props?.zonalConfig) { if (props.zonalConfig.monitorDuration) { - this.validateDurationLessThanOneSecond(props.zonalConfig.monitorDuration, 'monitorDuration'); + this.validateMinimumDuration(props.zonalConfig.monitorDuration, 'monitorDuration'); } if (props.zonalConfig.firstZoneMonitorDuration) { - this.validateDurationLessThanOneSecond(props.zonalConfig.firstZoneMonitorDuration, 'firstZoneMonitorDuration'); + this.validateMinimumDuration(props.zonalConfig.firstZoneMonitorDuration, 'firstZoneMonitorDuration'); } } @@ -210,7 +210,7 @@ export abstract class BaseDeploymentConfig extends Resource implements IBaseDepl this.node.addValidation({ validate: () => validateName('Deployment config', this.physicalName) }); } - private validateDurationLessThanOneSecond(duration: Duration, name: string) { + private validateMinimumDuration(duration: Duration, name: string) { const milliseconds = duration.toMilliseconds(); if (milliseconds > 0 && milliseconds < 1000) { throw new Error(`${name} must be greater than or equal to 1 second or 0, got ${milliseconds}ms`); From 57ee58eec227d48371c0021f83120ab020e20b31 Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Thu, 4 Jul 2024 22:36:19 +0900 Subject: [PATCH 20/23] update error message --- .../aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts | 2 +- .../aws-codedeploy/test/server/deployment-config.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts b/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts index 212eb119a8ed3..48bb17217b113 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts +++ b/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts @@ -213,7 +213,7 @@ export abstract class BaseDeploymentConfig extends Resource implements IBaseDepl private validateMinimumDuration(duration: Duration, name: string) { const milliseconds = duration.toMilliseconds(); if (milliseconds > 0 && milliseconds < 1000) { - throw new Error(`${name} must be greater than or equal to 1 second or 0, got ${milliseconds}ms`); + throw new Error(`${name} must be greater than or equal to 1 second or be equal to 0, got ${milliseconds}ms`); } } } diff --git a/packages/aws-cdk-lib/aws-codedeploy/test/server/deployment-config.test.ts b/packages/aws-cdk-lib/aws-codedeploy/test/server/deployment-config.test.ts index 190b683aa96aa..5fe3fd5b8bade 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/test/server/deployment-config.test.ts +++ b/packages/aws-cdk-lib/aws-codedeploy/test/server/deployment-config.test.ts @@ -117,7 +117,7 @@ describe('CodeDeploy DeploymentConfig', () => { monitorDuration: cdk.Duration.millis(500), }, }); - }).toThrow('monitorDuration must be greater than or equal to 1 second or 0, got 500ms'); + }).toThrow('monitorDuration must be greater than or equal to 1 second or be equal to 0, got 500ms'); }); test('throw error for invalid firstZoneMonitorDuration', () => { @@ -130,7 +130,7 @@ describe('CodeDeploy DeploymentConfig', () => { firstZoneMonitorDuration: cdk.Duration.millis(500), }, }); - }).toThrow('firstZoneMonitorDuration must be greater than or equal to 1 second or 0, got 500ms'); + }).toThrow('firstZoneMonitorDuration must be greater than or equal to 1 second or be equal to 0, got 500ms'); }); }); }); From 9b9b779699396f47e77f75591b2cbb37e52e45f9 Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Thu, 4 Jul 2024 22:37:17 +0900 Subject: [PATCH 21/23] udpate docs --- .../aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts b/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts index 48bb17217b113..983bd8148621b 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts +++ b/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts @@ -70,7 +70,9 @@ export interface ZonalConfig { /** * The period of time that CodeDeploy must wait after completing a deployment to the first Availability Zone. * - * Minimum value is 1 second or 0. + * Accepted Values: + * * 0 + * * Greater than or equal to 1 * * @default - the same value as `monitorDuration` */ From 8c297ffd056fd59f33ed84fdd0831b0ab9a40e0e Mon Sep 17 00:00:00 2001 From: paulhcsun <47882901+paulhcsun@users.noreply.github.com> Date: Thu, 4 Jul 2024 11:11:46 -0700 Subject: [PATCH 22/23] Update packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts --- .../aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts b/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts index 983bd8148621b..64cb02500f914 100644 --- a/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts +++ b/packages/aws-cdk-lib/aws-codedeploy/lib/base-deployment-config.ts @@ -61,7 +61,9 @@ export interface ZonalConfig { /** * The period of time that CodeDeploy must wait after completing a deployment to an Availability Zone. * - * Minimum value is 1 second or 0. + * Accepted Values: + * * 0 + * * Greater than or equal to 1 * * @default - CodeDeploy starts deploying to the next Availability Zone immediately */ From bdaedf2c42be3bb57a720d6cb259c494036d2631 Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Sat, 6 Jul 2024 18:16:05 +0900 Subject: [PATCH 23/23] update integ --- .../Stack.assets.json | 4 +- .../Stack.template.json | 15 + .../manifest.json | 2 +- .../tree.json | 332 +++++++++--------- 4 files changed, 184 insertions(+), 169 deletions(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/Stack.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/Stack.assets.json index eba8a87ec3315..e5b357963eccc 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/Stack.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/Stack.assets.json @@ -14,7 +14,7 @@ } } }, - "a0a65e4425ece3597cd26d96beef0fe9f9ca1ccfcfbda00b998268ddf860dffd": { + "1deac7388357b54d2c9ba4aa7384cf636a66b63ae9cbb324f8c1507919d7adf9": { "source": { "path": "Stack.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "a0a65e4425ece3597cd26d96beef0fe9f9ca1ccfcfbda00b998268ddf860dffd.json", + "objectKey": "1deac7388357b54d2c9ba4aa7384cf636a66b63ae9cbb324f8c1507919d7adf9.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/server/integ.deployment-group-zonal-config.js.snapshot/Stack.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/Stack.template.json index 2526892e2c7a5..b029754447770 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/Stack.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/Stack.template.json @@ -1029,9 +1029,18 @@ "ap-southeast-4": { "value": "nodejs20.x" }, + "ap-southeast-5": { + "value": "nodejs20.x" + }, + "ap-southeast-7": { + "value": "nodejs20.x" + }, "ca-central-1": { "value": "nodejs20.x" }, + "ca-west-1": { + "value": "nodejs20.x" + }, "cn-north-1": { "value": "nodejs18.x" }, @@ -1044,6 +1053,9 @@ "eu-central-2": { "value": "nodejs20.x" }, + "eu-isoe-west-1": { + "value": "nodejs18.x" + }, "eu-north-1": { "value": "nodejs20.x" }, @@ -1071,6 +1083,9 @@ "me-south-1": { "value": "nodejs20.x" }, + "mx-central-1": { + "value": "nodejs20.x" + }, "sa-east-1": { "value": "nodejs20.x" }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/manifest.json index b92d1cf10ec3a..aa2b78801998d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/manifest.json @@ -18,7 +18,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}/a0a65e4425ece3597cd26d96beef0fe9f9ca1ccfcfbda00b998268ddf860dffd.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1deac7388357b54d2c9ba4aa7384cf636a66b63ae9cbb324f8c1507919d7adf9.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/tree.json index 87ef7b7ed578c..a0d6893d9908f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/server/integ.deployment-group-zonal-config.js.snapshot/tree.json @@ -31,8 +31,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" } }, "PublicSubnet1": { @@ -75,16 +75,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "Stack/Vpc/PublicSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -105,8 +105,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -124,8 +124,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -144,8 +144,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -164,8 +164,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -192,14 +192,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PublicSubnet2": { @@ -242,16 +242,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "Stack/Vpc/PublicSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -272,8 +272,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -291,8 +291,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -311,8 +311,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -331,8 +331,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -359,14 +359,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PrivateSubnet1": { @@ -409,16 +409,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "Stack/Vpc/PrivateSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -439,8 +439,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -458,8 +458,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -478,14 +478,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "PrivateSubnet2": { @@ -528,16 +528,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "Stack/Vpc/PrivateSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -558,8 +558,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -577,8 +577,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -597,14 +597,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "IGW": { @@ -622,8 +622,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" } }, "VPCGW": { @@ -641,8 +641,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -653,28 +653,28 @@ "id": "Default", "path": "Stack/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnResource", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CustomResource", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0" } }, "LatestNodeRuntimeMap": { "id": "LatestNodeRuntimeMap", "path": "Stack/LatestNodeRuntimeMap", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnMapping", + "version": "0.0.0" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -685,30 +685,30 @@ "id": "Staging", "path": "Stack/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.AssetStaging", + "version": "0.0.0" } }, "Role": { "id": "Role", "path": "Stack/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnResource", + "version": "0.0.0" } }, "Handler": { "id": "Handler", "path": "Stack/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnResource", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CustomResourceProviderBase", + "version": "0.0.0" } }, "Asg": { @@ -745,8 +745,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } }, "from StackElbSecurityGroup01E7E34F:80": { @@ -774,14 +774,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroupIngress", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } }, "InstanceRole": { @@ -792,8 +792,8 @@ "id": "ImportInstanceRole", "path": "Stack/Asg/InstanceRole/ImportInstanceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -823,8 +823,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -892,20 +892,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "InstanceProfile": { @@ -922,16 +922,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnInstanceProfile", + "version": "0.0.0" } }, "ImportedInstanceProfile": { "id": "ImportedInstanceProfile", "path": "Stack/Asg/ImportedInstanceProfile", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "LaunchTemplate": { @@ -1021,14 +1021,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnLaunchTemplate", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.LaunchTemplate", + "version": "0.0.0" } }, "ASG": { @@ -1073,30 +1073,30 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { "id": "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "path": "Stack/SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118": { "id": "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118", "path": "Stack/SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Elb": { @@ -1136,8 +1136,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnLoadBalancer", + "version": "0.0.0" } }, "SecurityGroup": { @@ -1166,8 +1166,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } }, "to StackAsgInstanceSecurityGroup57D71772:80": { @@ -1195,14 +1195,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroupEgress", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } }, "Listener": { @@ -1231,8 +1231,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnListener", + "version": "0.0.0" } }, "TargetGroup": { @@ -1260,26 +1260,26 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnTargetGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationTargetGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListener", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer", + "version": "0.0.0" } }, "DeploymentConfig": { @@ -1307,14 +1307,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_codedeploy.CfnDeploymentConfig", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_codedeploy.ServerDeploymentConfig", + "version": "0.0.0" } }, "Alarm1": { @@ -1337,14 +1337,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", + "version": "0.0.0" } }, "CodeDeployGroup": { @@ -1359,8 +1359,8 @@ "id": "ImportRole", "path": "Stack/CodeDeployGroup/Role/ImportRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1398,14 +1398,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Application": { @@ -1422,22 +1422,22 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_codedeploy.CfnApplication", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_codedeploy.ServerApplication", + "version": "0.0.0" } }, "Bucket": { "id": "Bucket", "path": "Stack/CodeDeployGroup/Bucket", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_s3.BucketBase", + "version": "0.0.0" } }, "Resource": { @@ -1494,36 +1494,36 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_codedeploy.CfnDeploymentGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_codedeploy.ServerDeploymentGroup", + "version": "0.0.0" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "Stack/BootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "Stack/CheckBootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" } }, "ServerDeploymentGroupZonalConfig": { @@ -1550,22 +1550,22 @@ "id": "BootstrapVersion", "path": "ServerDeploymentGroupZonalConfig/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "ServerDeploymentGroupZonalConfig/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" } } }, @@ -1590,8 +1590,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" } } } \ No newline at end of file